[V4Rb] VDatabase.LastInsertedRecID
Sims, John
ayu8 at cdc.gov
Mon Oct 17 08:27:11 CDT 2005
> > You will have in next build 3 ways to get RecID !!!!!
> >
> >
> > 3) v2 way like have mySQL and others
> >
> > db.SqlExecute( "INSERT INTO T1 ..." )
> >
> > recid = db.LastInsertedRecID() // this is recid of T1.
Hi Ruslan,
I'd like to get some clarification on option #3 if we are working with
Vserver in a multi-user environment.
Scenario:
User 1 calls: db.SqlExecute( "INSERT INTO T1 ..." )
User 2 calls: db.SqlExecute( "INSERT INTO T2 ..." )
[before User 1's app can call...]
User 1 calls: recid = db.LastInsertedRecID()
What does User 1 get for recid? T1 last record inserted or T2 last
record inserted? I would guess User 1 will get the last record added to
T2.
Thanks, Ruslan.
-John
More information about the Valentina
mailing list