Subject | Re: [firebird-support] Generator Fires Twice?? |
---|---|
Author | Helen Borrie |
Post date | 2005-08-09T23:56:05Z |
At 06:17 PM 9/08/2005 +0000, Sam Hunt wrote:
the generator for the client program to use. It has absolutely no
connection to the the BI trigger.
submitting the statement? What is your API interface component doing with
the statement? Can you put a monitor on it to see the statement that is
being passed across the API?
new.value for NULL before deciding whether to grab a new value from the
generator. Go back to P. 647 and start at the heading "Implementing
Auto-Incrementing Keys".
./heLen
>The following statement used to work.No, it never did that. What it did (does) do is to pull a new value from
>(pg 648 Helen's book)
>
>sql.add('SELECT GEN_ID(GEN_PK_CONSTITUENTS,1) AS RESULT FROM
>RDB$DATABASE');
>
>and did exactly what it was supposed to do - grab the new record ID
>created by the GEN_PK_CONSTITUENTS generator when the BI trigger
>fired.
the generator for the client program to use. It has absolutely no
connection to the the BI trigger.
>Now, I get the following error when I attempt to trace (in Delphi)This part of the problem lies somewhere in your Delphi code. How are you
>thru this line of code:
>"SQL error code = -104
>Unexpected end of command'.
submitting the statement? What is your API interface component doing with
the statement? Can you put a monitor on it to see the statement that is
being passed across the API?
>Also, the trigger value is destroyed and the above statement causes aThis part of the problem is due to not having the BI trigger test the
>new value to be created.
new.value for NULL before deciding whether to grab a new value from the
generator. Go back to P. 647 and start at the heading "Implementing
Auto-Incrementing Keys".
./heLen