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?
Sequence causes posting error
Moderators: gto, cipto_kh, EgonHugeist
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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
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