Thanks Mark,

it is not an auto_increment field.

I think something is wrong in the way Rev creates a query out of my array.
If I force Rev to put the right value in the query by doing this:
put "INSERT INTO g2_Entity() VALUES('"&vars[1]&"',: 2,:3,:4,:2,:3,:5,:4)" into tsql
the record is inserted with the correct id.
But the standard way:
put "INSERT INTO g2_Entity() VALUES(:1,:2,:3,:4,:2,:3,:5,:4)" into tsql
inserts it with the wrong id.

I have double checked the values of my array vars[] - it is OK.

I was wondering if this might have something to do with the way Rev handles arrays. Rev 'does' only associative arrays, not numeric arrays, isn' t it? I was a bit surprised to find out that I had to use numeric arrays in order to build queries.

Just a thought..

Henk

Henk-

Probably a silly question, but I don't suppose id is an auto_increment
field?
If so, you want to specify null for the id and you won't be able to override
it.

--
 Mark Wieder
 mwieder at ahsoftware.net
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to