cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: Has esql taglib a template for no-errors??
Date Wed, 24 Jan 2001 21:38:10 GMT
On Wed, 24 Jan 2001, [iso-8859-1] Pål Wester wrote:

> I want to do an insert into a table
> and has written following:
>
> <esql:connection>
> 	<esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
> 	<esql:dburl>jdbc:mysql://localhost:3306/quart</esql:dburl>
> 	<esql:username>quartuser</esql:username>
>   	<esql:password>passwd</esql:password>
>   	<esql:execute-query>
>     		<esql:query>INSERT INTO Q_ANSATT ( brukid, navn, tel, funksjon,
> passord, avd ) VALUES(
> '<xsp:expr>login</xsp:expr>','<xsp:expr>name</xsp:expr>','<xsp:expr>tel</xsp
> :expr>','<xsp:expr>funksjon</xsp:expr>','<xsp:expr>passwd</xsp:expr>',
> '<xsp:expr>avd</xsp:expr>' )</esql:query>
> 		<esql:error-results>
> 			<section>
> 				An error has occured
> 			</section>
> 			<section>
> 				Error:<esql:get-message/>
> 			</section>
> 		</esql:error-results>
> 	</esql:execute-query>
> </esql:connection>
>
> this will catch errors, but I can't give the user a
> message that the task was successfull, or can I?

try update-results. also try using esql:parameter in your query.  it's
safer.

- donald


Mime
View raw message