Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT, updatable cursor and last identity value
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SPT, updatable cursor and last identity value
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01458392
Message ID:
01458392
Views:
112
Hi everybody,

We're using SPT and then a special program to make cursor updatable. I see this code to get the last inserted value

mysqlexec("select @@identity as keyval",'csrKeyVal', program())

which doesn't look entirely correct to me - who guarantees that by doing a separate query you'll get the value of the record you just inserted and not someone else in between?

Is there a better way to get the latest value?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform