Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unsuccesful TABLEUPDATE for DELETE FROM command w. SPT
Message
De
02/04/2003 18:16:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Unsuccesful TABLEUPDATE for DELETE FROM command w. SPT
Divers
Thread ID:
00773330
Message ID:
00773330
Vues:
51
I'm trying to mark some VFP records as deleted. I'm using SPT, but not quite sure how to set up CURSORSETPROP: what fields do I list in UPDATABLEFIELDLIST & UpdateNameList? Do I need to list all fields in myTable? I've tried (as below), but TABLEUPDATE was unsuccesfull. Please help. Thanks all!

SET EXCLUSIVE OFF

*gDataPath = path of where the table is
gDataPath='c:tempdata\'

lcConnStr="DRIVER={Microsoft Visual FoxPro Driver};" + ;
"SourceDB=&gDataPath;SourceType=DBF;UID=;PWD=;"

lnHandle=SQLSTRINGCONNECT(lcConnStr)
lSuccess=SQLEXEC(lnHandle,;
"SELECT * FROM myTable","cTable")

SET MULTILOCKS ON
CURSORSETPROP('Buffering',5,'cTable')
CURSORSETPROP('TABLES','myTable','cTable')
CURSORSETPROP('UPDATABLEFIELDLIST','uid','cTable')
CURSORSETPROP('KeyFieldList','uid','cTable')
CURSORSETPROP('UpdateNameList','uid myTable.uid','cTable')
CURSORSETPROP('FetchMemo',.T.,'cTable')
CURSORSETPROP('SendUpdates',.T.,'cTable')

DELETE FROM cTable WHERE uid=92156126

IF TABLEUPDATE(1,.T.,'cTable')
MESSAGEBOX('OK')
ELSE
MESSAGEBOX('DID NOT UPDATE')
ENDIF
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform