Page 1 of 1

Sequence causes posting error

Posted: 30.10.2007, 00:22
by vfclists
When I attempt to add a new record to postgresql table in which the record id integer is generated by a sequence on the server, I get a value required error although the server will generate the value.

Is there some way it can be disabled?

TZQuery has a sequence property? Will setting it to the name of the sequence on the server cause to get an update and update the sequence on the server?

How does it know which field in the table uses that sequence?

Posted: 30.10.2007, 09:16
by mdaems
Hi,

There are two solutions to this problem (you can also search the forum for details)
- Use a TZSequence component and attach it to the query (setting the sequence property to a string won't work).
- set the 'required' property of the query field to false and UpdateMode to umUpdateChanged. The disadvantage of this method is that the assigned id's are not visible without a dataset refresh.

Mark

Posted: 04.11.2007, 23:49
by vfclists
I saw the ZSequence component on the component lists and it works quite well with PostgreSQL.

I have had no problems with it so far.