Subject | Getting id of last inserted record |
---|---|
Author | hay77772000 |
Post date | 2003-04-28T20:22:28Z |
Hi. Am still continuing to port our system from mySQL to Firebird.
Have set up the database correctly, along with generators and
triggers that simulate an autoincrement field.
However, I still need a way to get the id back of the record just
inserted, in a distributed, multiple-user environment.
Can anyone let me know how to do so, please? I understand I could
use SELECT GEN_ID(GEN_ATABLE, 0) FROM RDB$DATABASE; but that this
cannot be relied on with other transactions etc..
Thanks,
David
Have set up the database correctly, along with generators and
triggers that simulate an autoincrement field.
However, I still need a way to get the id back of the record just
inserted, in a distributed, multiple-user environment.
Can anyone let me know how to do so, please? I understand I could
use SELECT GEN_ID(GEN_ATABLE, 0) FROM RDB$DATABASE; but that this
cannot be relied on with other transactions etc..
Thanks,
David