Subject | RE: [IBO] DSQL question |
---|---|
Author | Nico Callewaert |
Post date | 2001-03-16T10:13:52Z |
Perfect Geoff !!
Thank you,
Nico
ncw@...
nico.callewaert@...
-----Oorspronkelijk bericht-----
Van: Geoff Worboys [mailto:geoff@...]
Verzonden: vrijdag 16 maart 2001 11:11
Aan: IBObjects@yahoogroups.com
Onderwerp: Re: [IBO] DSQL question
parameter values in code. What I do in this situation is...
var
tmpID: int64;
begin
tmpID := MyDSQL.GeneratorValue('MYGEN',1);
MyDSQL.ParamByName['RegistNo'].AsInt64 := tmpID;
etc
now I have tmpID that I can use as a parameter to do related things.
This presumes that any insert trigger will only generate a new
identity value if the if New.RegistNo IS NULL. (Which is HIGHLY
recommended.)
HTH
Geoff Worboys
Telesis Computing
Yahoo! Groups Sponsor
Click Here to Find Software Faster
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Thank you,
Nico
ncw@...
nico.callewaert@...
-----Oorspronkelijk bericht-----
Van: Geoff Worboys [mailto:geoff@...]
Verzonden: vrijdag 16 maart 2001 11:11
Aan: IBObjects@yahoogroups.com
Onderwerp: Re: [IBO] DSQL question
> I have a DSQL component that inserts records in a table. ISince you are using DSQL I am supposing that you are assigning the
> have a Before Insert trigger with : NEW.RegistNo = gen_id
> (RegistNo_Gen, 1). After the DSQL component, I would like to
> know the value of NEW.RegistNo.
parameter values in code. What I do in this situation is...
var
tmpID: int64;
begin
tmpID := MyDSQL.GeneratorValue('MYGEN',1);
MyDSQL.ParamByName['RegistNo'].AsInt64 := tmpID;
etc
now I have tmpID that I can use as a parameter to do related things.
This presumes that any insert trigger will only generate a new
identity value if the if New.RegistNo IS NULL. (Which is HIGHLY
recommended.)
HTH
Geoff Worboys
Telesis Computing
Yahoo! Groups Sponsor
Click Here to Find Software Faster
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]