Subject Re: [firebird-support] How insert in two tables with FK, on the same transaction ?
Author Martijn Tonies
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