Subject | RE: [ib-support] Using a Generator when creating a new record |
---|---|
Author | Josipovic, Nikica |
Post date | 2002-02-28T14:00:49Z |
IBX has now also a similar function as GeneratorLinks in IBObjets, where the
dataset is responsible itself to get the generatorvalue for the PK.
I don't remember anymore how it was called, but a short look into the
Documentation of IBX or asking Woody (present on this list, I think he's an
IBX-User) should help you immediately....
Cu, Nick
dataset is responsible itself to get the generatorvalue for the PK.
I don't remember anymore how it was called, but a short look into the
Documentation of IBX or asking Woody (present on this list, I think he's an
IBX-User) should help you immediately....
Cu, Nick
> -----Original Message-----
> From: Svein Erling Tysvær
> [mailto:svein.erling.tysvaer@...]
> Sent: Thursday, February 28, 2002 3:10 PM
> To: ib-support@yahoogroups.com
> Subject: Re: [ib-support] Using a Generator when creating a new record
>
>
> >How would I get the value myself?
>
> Have a separate query with
> SELECT GEN_ID(GEN_NEW_AUTHOR_ID, 1) AS MYGENERATOR FROM
> RDB$DATABASE;
>
> and then add something like
>
> DataSet.FieldByName('AUTHOR_ID').Value :=
> DataSet2.FieldByName('MYGENERATOR').Value;
>
> >For the first option, if I just removed the AUTHOR_ID from
> the InsertSQL,
> >will the server put it in for me?
>
> Yes, that ought to do (though I've never used IBX).
>
> Set
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Tiny Wireless Camera under $80!
> Order Now! FREE VCR Commander!
> Click Here - Only 1 Day Left!
> http://us.click.yahoo.com/nuyOHD/7.PDAA/yigFAA/67folB/TM
> --------------------------------------------------------------
> -------~->
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>