Thanks Craig, usful tip - probably won't use it this time (already changed the code to fetch the field first), but may use it in the future!
Cheers, Phil. ----- Original Message ----- From: "Craig Goodall" <[EMAIL PROTECTED]> To: "NZ Borland Developers Group - Delphi List" <[email protected]> Sent: Friday, January 14, 2005 12:25 PM Subject: Re: [DUG] concurrent Interbase Transactions > Hi Phil, > > I've recently cut over from IB 6.02 to Firebird 1.5.2 with a couple of > apps using IBX. With IBX, this steps you mention are handled for you as > the TIBQuery has a Generator Field property which when set, will cause > the Generator to be fired, the new PK value to be returned to the > client, and the new row Inserted (with the PK). I don't know what > components you're using, so this may not be an option for you, but it > certainly works well. Before that property was added to IBX, I used to > set TIBQuery.ForcedRefresh to True and the RefreshQuery would return the > PK back to the client via an alternate unique key. > > Craig. > > > Phil Middlemiss wrote: > > >Thanks to all who replied. In the end I did the inevitable (Johns > >suggestion) and now fetch a new ID first and include it in the INSERT > >operation rather than have the trigger. > > > >Phil > > > _______________________________________________ > Delphi mailing list > [email protected] > http://ns3.123.co.nz/mailman/listinfo/delphi > _______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
