General information
Title:
Making SQL Pass-Through Cursor Updatable
I'm having difficulty making an SPT cursor updatable. I tried two different ways:
1) Connected to data source and called code from FAQ ID: 8153 (didn't copy all the text of that code)
2) Attempted to issue the CURSORSETPROP command directly (2nd set of code)
I changed the data in the cursor and issued a tableupdate without error. The data was never saved on the server.
What am I doing wrong?
Thanks,
Monique
---CODE---------------------------------------
lnHandle=SQLCONNECT("RouteSQL","username","password")
lcQueryStr="SELECT * FROM ROUTES"
lcCursor="routeTmp"
=SQLEXEC(lnHandle,lcQueryStr,lcCursor)
* cCursor = Cursor name
* cSourceTable = Source Table for data
* cPK = Primary Key of Source Table
* cFldList = List of fields to update (or All)
cCursor="routeTmp"
cSourceTable="dbo.routes"
cPK="id"
cFldList="Paginated"
cUpdtList="Paginated dbo.routes.Paginated"
-------------------------------------------------
lSuccess=SetUpdate(cCursor, cPK, cSourceTable, "id,jobno,no",.f.)
*(OR)
=CURSORSETPROP("Tables",cSourceTable,cCursor)
=CURSORSETPROP("KeyFieldList",cPK,cCursor)
=CURSORSETPROP("UpdatableFieldList",cFldList,cCursor)
=CURSORSETPROP("UpdateNameList",cUpdtList,cCursor)
=CURSORSETPROP("Buffering",5,"routetmp")
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only