Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TABLEUPDATE does not cursor's commit deleted records?
Message
From
07/11/2002 13:59:17
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
TABLEUPDATE does not cursor's commit deleted records?
Miscellaneous
Thread ID:
00719966
Message ID:
00719966
Views:
71
I used SQLEXEC to give me a cursor, & used CURSORSETPROP to make the cursor updatable.
But when I delete some records from the cursor, the records was not marked deleted in the original table/data source, although it is marked deleted in the cursor. How do I make the records deleted in the original table/data source? (I used 'DELETE FROM' command + TABLEUPDATE command).

lcConnStr="DRIVER={Microsoft Visual FoxPro Driver};" + ;
"SourceDB=c:\projects\myData.dbc;SourceType=DBC;UID=;PWD=;"

THIS.lnHandle=SQLSTRINGCONNECT(lcConnStr)

IF THIS.lnHandle>0
lSuccessMyTable=SQLEXEC(THIS.lnHandle,"SELECT * FROM myTable","cMyTable")
IF lSuccessMyTable=1
SET MULTILOCKS ON
CURSORSETPROP('Buffering',5,'cMyTable')
CURSORSETPROP('TABLES','myTable','cMyTable')
CURSORSETPROP('UPDATABLEFIELDLIST','refno,budgetcode','cMyTable')
CURSORSETPROP('KeyFieldList','refno','cMyTable')
CURSORSETPROP('UpdateNameList','refno myTable.ercaRefNo,budgetcode myTable.budgetcode','cMyTable')
CURSORSETPROP('FetchMemo',.T.,'cMyTable')
CURSORSETPROP('SendUpdates',.T.,'cMyTable')
ENDIF
ENDIF

DELETE FROM cMyTable WHERE refno=12
BROWSE
*all records with refno=12 was marked for deletion.

TABLEUPDATE(0,.T.)
*records not marked for deletion in original table????
Next
Reply
Map
View

Click here to load this message in the networking platform