Hallo,

i think you just have to skip the enclosing tag
esql:parameters to get it work, eg. like this:

<esql:query>INSERT INTO foo(id,url,email,username,password)
VALUES ( NEXTVAL('id_seq'),'abcd','[EMAIL PROTECTED]','dfgdf','123');</esql:query>


Max

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Eric Vernichon
> Gesendet: Mittwoch, 8. August 2001 13:38
> An: [EMAIL PROTECTED]
> Betreff: [C2] esql & postgres' nextval
>
>
> I'm trying to do the following :
> <esql:query>
> INSERT INTO foo(id,url,email,username,password)
> VALUES (<esql:parameter>NEXTVAL('id_seq')
> </esql:parameter>,'abcd','[EMAIL PROTECTED]','dfgdf','123');
> </esql:query>
>
> Error generated by C2 :
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate():java.lang.RuntimeException:
> Error executed
> prepared statement: INSERT INTO
> foo(id,url,email,username,password) VALUES
> (?,'abcd','[EMAIL PROTECTED]','dfgdf','123'); : java.sql.SQLException:
> ERROR: pg_atoi:
> error in "NEXTVAL('id_seq')": can't parse "NEXTVAL('id_seq')"
>
> id is my primary key and i would like to auto-increment it.
>
> Any suggestion ?
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to