Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making SQL Pass-Through Cursor Updatable
Message
De
03/03/2003 18:29:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Making SQL Pass-Through Cursor Updatable
Divers
Thread ID:
00760620
Message ID:
00760620
Vues:
73
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")
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform