Subject Re: [IBO] Getting the value of a generator
Author Helen Borrie
At 09:54 AM 13/04/2012, Craig Cox wrote:
>(Firebird 1.5+, Delphi XE, IBOjects)
>
>I'm guessing there is a very simple answer to this problem.
>
>I want to get the current generator value of one table

Tables don't have generators. A generator is a self-contained sequence. You'll need to know the name of the generator that is used to populate the column in question, then you can use GeneratorValue(Name_of_Generator, 0) to get the latest value that has been generated.

>, increment it in Delphi and use the new value in another table. I thought the GeneratorValue() method looked promising, but I may not understand it well enough to use it properly. If you can tell me how to get the value of the generator, I think I can figure out the rest.

Sounds dicey, unless your database has only one user.

Helen