Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update confilict
Message
From
22/01/2003 19:47:56
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
22/01/2003 12:01:44
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00744319
Message ID:
00744568
Views:
12
Toni
 sqlexec(lnHndl,"insert table (column) values (value);select @@identity as mypk","cursor")
 lnPk = cursor.mypk
 sqlexec(lnHndl,"select * from table where mypk = lnPk 
this works unless you have a trigger that is inserting a row in another table then you have do some things that will give you the correct @@identity.

>Hi everybody
>
>I am using ms sql server as back end together with VFP 6. I have problem with updating new entered data via SPT.
>
>
>Index key in the table is defined as IDENTITY. I can enter the data and Tableupdate(.T.) writes data to the back end. Problem is if I make changes to previously appended record. Identity field in grid is still 0.
>
>I get error Update conflict (Error 1585): An optimistic locking conflict has been detected while trying to update a view.
>
>All other records which were apended earlier they have IDENTITY > 0 can be changed, problem is yust with record which is new for VFP.
>
>
>Thanks in advance
>
>
>Toni
Previous
Reply
Map
View

Click here to load this message in the networking platform