Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making SQL Pass-Through Cursor Updatable
Message
 
À
03/03/2003 18:29:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00760620
Message ID:
00760711
Vues:
34
Hi,

have a look at How to make SQL Pass-Through cursor updatable FAQ #8153 or A Simple SQL Pass-thru class File #15131

HTH,
Armin


>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")

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform