Page 1 of 1

Link a TIBQuery to a GENERATOR

Posted: Tue 15 Dec 2009 21:54
by jrestifo
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

Posted: Thu 17 Dec 2009 08:56
by Plash
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.

Posted: Fri 18 Dec 2009 11:29
by jrestifo
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é

Posted: Fri 18 Dec 2009 14:35
by jrestifo
Well I got it!
What was missing was a trigger to fire the generator.
Marry Xmas to all of you!!!
José