Link a TIBQuery to a GENERATOR

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jrestifo
Posts: 3
Joined: Tue 15 Dec 2009 21:40

Link a TIBQuery to a GENERATOR

Post by jrestifo » Tue 15 Dec 2009 21:54

I was using a TIBDataSet and one of the fields was generated by using
a trigger on the database (Firebird 2.1.2). After converting to IBDAC the
link to the generator was lost and new records added shows null instead of
the generated number.
In TIBDataSet there is a property 'generator field' but in TIBQuery I could not find anything similar.
Thank you for your assistance.
Jose

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 17 Dec 2009 08:56

Set the DMLRefresh property of TIBCQuery to True.

There are also the KeyGenerator property. But if you use it, the field value is generated on the client.

jrestifo
Posts: 3
Joined: Tue 15 Dec 2009 21:40

Post by jrestifo » Fri 18 Dec 2009 11:29

Thanks for the quick reply.
I made the change but the probleme was not solved.
It is possible that my Generator was not created correctly as when I check it in the Dependency no link is shown to the DataSet or the field that has to be updated with the result of executing the generator.
How can I alter the generator to show the correct Dependency?
Will appreciate your help.
José

jrestifo
Posts: 3
Joined: Tue 15 Dec 2009 21:40

Post by jrestifo » Fri 18 Dec 2009 14:35

Well I got it!
What was missing was a trigger to fire the generator.
Marry Xmas to all of you!!!
José

Post Reply