Subject | Re: After Committed Autoincrement Field Value Not Updated In DBGrid |
---|---|
Author | Rio Hermawan |
Post date | 2008-10-14T14:35:09Z |
Thank's Helen.
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...>
wrote:
You are getting the effects described because your datasets have not
been updated after the Commit. Look for a Refresh method and apply
it to all datasets. If Refresh is not supported, then use Close
followed by Open.
event and write it directly to the new master record. Check whether
IBX has a technique for doing this automatically, as the better
Delphi components do. For example, IBObjects (which I use) has a
GeneratorLinks property where one can associate all generated fields
with their generators. It calls an underlying function Gen_ID() that
returns the latest generator value; and Gen_ID() can also be called
at various levels. If IBX doesn't have such capabilities, it is very
simple to write such a function...
more IBX help and links at Marco Cantu's website: http://
www.marcocantu.com
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...>
wrote:
> A Commit ends the transaction but your application is still lookingat the database state as it was when the old transaction started.
You are getting the effects described because your datasets have not
been updated after the Commit. Look for a Refresh method and apply
it to all datasets. If Refresh is not supported, then use Close
followed by Open.
>detail structure is to fetch the generator value in the BeforePost
> A tip for when you are using generated keys in Delphi with a master-
event and write it directly to the new master record. Check whether
IBX has a technique for doing this automatically, as the better
Delphi components do. For example, IBObjects (which I use) has a
GeneratorLinks property where one can associate all generated fields
with their generators. It calls an underlying function Gen_ID() that
returns the latest generator value; and Gen_ID() can also be called
at various levels. If IBX doesn't have such capabilities, it is very
simple to write such a function...
>for InterBaseXpress (IBX) for some examples. You might find some
> However, this list is not a Delphi list. Search the Delphi help
more IBX help and links at Marco Cantu's website: http://
www.marcocantu.com
>
> ^ heLen
>