[Zope] Z Sql method newbie question

Fabrizio facelle@libero.it
Sat, 14 Jul 2001 22:55:29 +0200


Hallo,

Newbie. Zope 2.3.3 on Win98. Interbase 6.0 through gvibDA.

I have a database table with three fields : id, name, surname.
I want to create a simple Z Sql method that adds a new record to the table
and automatically assigns an increased id value to the new record .

I tried something like :

insert into table(name, surname) values
      ( max (id) + 1,
       <dtml-sqlvar name type="string">,
       <dtml-sqlvar surname type="string">
       )

(Method arguments are : name, surname).


But It does not work as I expect.

Any help will be appreciated.
Thanks in advance.

Fabrizio C.