Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter UpdateGram
Message
De
17/11/2002 20:47:01
 
 
À
17/11/2002 10:38:22
Bob Tracy
Independent Consultant
Driftwood, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00723643
Message ID:
00723692
Vues:
13
Contains the XML UpdateGram generated if the UpdateCmdDataSourceType, InsertCmdDataSourceType, and DeleteCmdDataSourceType properties are set to "XML" when Visual FoxPro updates, inserts, or deletes data in the cursor. Read–only at design time and run time.

BOb


>Hi All,
>
>I've created a test program to explore the XML capabilites of the CursorAdapater Class but I'm having difficulty getting it automatically produce an UpdateGram as advertised in the documentation.
>
>I have a simple XML document containing two "employee" nodes that match the CursorSchema in the attached code sample. The .prg runs without error, a cursor is created, and the cursor update is accomplished. The changes are reflected in the updategram created with the XMLUPDATEGRAM('employee') function. The UpdateGram property of the the CursorAdapter remains an empty string.
>
>I've tried alternate setting of a number of CursorAdapter properties without any success. Anyone have any suggestions?
>
>
>LOCAL CA AS CursorAdapter,oErr AS Exception,lcFile,lcSchema,lcGram1,lcGram2
>CA = CREATEOBJECT('CursorAdapter')
>SET MULTILOCKS ON
>lcFile = [c:\development\vfp8\employee.xml]
>lcSchema = [lastname C(40),firstname C(40),;
>			address C(60),city C(40),state C(2),zip C(5)]
>TRY
>	WITH CA			
>		.Alias = 'employee'
>		.DataSourceType = "XML"
>		.CursorSchema = lcSchema
>		.SelectCmd = lcFile
>		.UpdateCmdDataSourceType = "XML"
>		.InsertCmdDataSourceType = "XML"
>		.DeleteCmdDataSourceType = "XML"
>		.BufferModeOverride = 5	
>		.CursorFill(.T.,.F.,512)
>	ENDWITH
>	GO BOTTOM
>	replace firstname WITH 'Sam'
>	lcGram1 = CA.UpdateGram
>	lcGram2 = XMLUPDATEGRAM('employee')
>CATCH TO oErr
>	SUSPEND
>FINALLY
>	SUSPEND
>ENDTRY
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform