Problem with Autoinc And TZQuery

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Capello
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 10.10.2007, 19:01

Problem with Autoinc And TZQuery

Post by Capello »

Hello,
I have a problem with Autoinc field. In my project I use Delphi 5, Firebird2.0 and Zeos 6.6.0 beta.
using TZQuery And TZUpdateSQL to insert record into table with primary key type AutoInc. when I post I recieve error (AutoInc field not assigned and is null).
I need your help. Thanks
ssamayoa
Junior Boarder
Junior Boarder
Posts: 29
Joined: 14.01.2006, 19:06

Post by ssamayoa »

Autoinc fields don't exists on Firebird, you must provide from client side (before post is a good point to put it) or server side must provide it via before insert trigger.

If you have a before insert trigger to set the "autoinc" field, I suspect you have persistent fields for your TZQuery. Set "Required" to false in the "autoinc" field.

Regards.
ssamayoa
Junior Boarder
Junior Boarder
Posts: 29
Joined: 14.01.2006, 19:06

Post by ssamayoa »

Sorry, I wrote in a hurry and omit a few words:

"Autoinc fields don't exists on Firebird, you must provide field value from client side (before post is a good point to put it) or server side via before insert trigger."

Regards.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Capello,

Have a look here : http://zeos.firmos.at/viewtopic.php?t=1257

Mark
Post Reply