Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote View with IDENTITY field
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Remote View with IDENTITY field
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01213531
Message ID:
01213531
Vues:
70
I have an RV on a SQL Server table with an IDENTITY (int) field. After an add, I am trying to get the IDENTITY fields value to stuff into the RV for subsequent possible edits. I do this fine but the next tableupdate(1) always returns an Update Conflict. Is what I am trying to do possible? If so, any suggestions on what I'm doing wrong? Example of code below:

append blank

(... populate all the fields, except sqlupdtuid (IDENTITY field) which is the key)

=tableupdate(1) && This is successful

lnHandle = CURSORGETPROP("ConnectHandle", "CDMTESTTABLE")
=SQLEXEC(lnHandle, "SELECT @@IDENTITY AS LastPK", "LastPK")
select cdmtesttable
replace sqlupdtuid with lastpk.lastpk

=tableupdate(1) && This fails with Update Conflict
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform