Subject SV: [ib-support] Porting from mysql to firebird
Author Datatal AB - Gauffin, Jonas
How do I retrieve the value?
Tried to execute this query through odbc, SELECT gen_id(userid, 0), and it failed. How do I retrieve the id?

Userid is the name of the generator.

> -----Ursprungligt meddelande-----
> Från: Svein Erling Tysvaer
> [mailto:svein.erling.tysvaer@...]
> Skickat: den 21 februari 2003 15:09
> Till: ib-support@yahoogroups.com
> Ämne: SV: [ib-support] Porting from mysql to firebird
>
>
> Hej Jonas, jag märkte inte du var svensk.
>
> At 14:13 21.02.2003 +0100, you wrote:
> >So if I want to insert data to all three tables (using odbc):
> >1. Run a query to fetch a id from gen_id
> >2. Insert data to user_info
> >3. insert data to user_extension
> >4. insert data to user_number
> >
> >Or am I missing something?
>
> Yup, that it is how I would have done it. Of course there are
> other things
> to think of as well, e.g. transactions or what to do if
> someone tries to
> insert without specifying the PK or if you want to ascertain
> an unbroken
> sequence for a field (there will be gaps with generators in case of
> rollbacks), but you've understood the basic principle about
> using generators.
>
> Set
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/FpY02D/vN2EAA/xGHJAA/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/
>
>
>
>