Subject | Re: [firebird-support] How insert in two tables with FK, on the same transaction ? |
---|---|
Author | Martijn Tonies |
Post date | 2007-01-30T12:10:03Z |
Hi,
Get the PK value for the master table from within the procedure, not
in the trigger.
Then, use this value to create the detail record.
Never EVER use gen_id(..., 0) -> cause it's not multi user safe
at all.
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
Get the PK value for the master table from within the procedure, not
in the trigger.
Then, use this value to create the detail record.
Never EVER use gen_id(..., 0) -> cause it's not multi user safe
at all.
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com