Subject | Re: [IBO] Generator values not udpated |
---|---|
Author | Helen Borrie |
Post date | 2008-11-08T02:45:40Z |
At 01:10 PM 8/11/2008, you wrote:
It seems there's more to this than you are telling us...and we're all trying to help capture a bunny-rabbit in a minefield.
The only code we have seen so far is a snippet showing us how you are getting hold of a generator value and poking it into a local variable. We haven't seen the SQL for the insert statement, nor the Delphi statement where you assign the local variable to a parameter.
So tell us more. We are trying to help you, not steal your lunch. ;-)
Helen
>> So the generator is not being 'reverted' but rather never advanced?Sorry, Ed, but it's not being reverted unless you (unwisely or inadvertently) have code there that is making it so; or you have a user at that site with an admin tool that enables him/her to reset generators. The transient nature of the problem report suggests the latter more strongly than the former...but DO eliminate the possibility that your code can push a negative number into the second argument of your Gen_ID() function call sometimes.
>
>no, because I get new values for new records from the generator. It is
>being increemented then being reverted.
>> I prefer to let the Firebird insert these values using a > trigger.In a previous posting you said this import routine was doing batch inserts. How can this be compatible with retaining the latest generator value and applying it to detail inserts.
>
>me too...
>
>> Ok as long as you don't need the value in other tables, but
>> more of a problem if you need to use it as a key to records in
>> detail tables.
>
>I do on detail inserts.
It seems there's more to this than you are telling us...and we're all trying to help capture a bunny-rabbit in a minefield.
The only code we have seen so far is a snippet showing us how you are getting hold of a generator value and poking it into a local variable. We haven't seen the SQL for the insert statement, nor the Delphi statement where you assign the local variable to a parameter.
So tell us more. We are trying to help you, not steal your lunch. ;-)
Helen