Subject | Re: [IBO] Connect to Database calls Generator |
---|---|
Author | Helen Borrie |
Post date | 2003-01-01T23:05:45Z |
At 07:38 PM 1/01/2003 +0100, you wrote:
empty dataset and you open it in edit mode. The behaviour under these
conditions is to open a new row for inserting, thus prompting the gen_id
call. Stepping up the generator, without storing any data that use the
value, is not (or ought not to be) a problem. You should review your
program flow, however, and only call DML methods on queries when the DML
operation is actually needed.
Helen
>In my Application I noticed that the generator value of one table increasedThis will be caused if the TABBESTELL query has RequestLive true, has an
>without ever inserting new rows. When trying to find the portion of the code
>responsible for that, I found that whenever the app. connects to the
>database and steps through the querys to activate them, it also sends this
>to the server:
>
>SELECT GEN_ID ( GEN_TABBESTELL, 1 )
>FROM RDB$DATABASE
>PLAN (RDB$DATABASE NATURAL)
>
>The generator GEN_TABBESTELL is defined as Generator_Link of one TIB_Query
>and nowhere else.
>The odd thing is, that this command is send to the server long after that
>particular query has been prepared and opened.
>
>Is there any property of the query which can possibly cause this?
empty dataset and you open it in edit mode. The behaviour under these
conditions is to open a new row for inserting, thus prompting the gen_id
call. Stepping up the generator, without storing any data that use the
value, is not (or ought not to be) a problem. You should review your
program flow, however, and only call DML methods on queries when the DML
operation is actually needed.
Helen