Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter UpdateGram
Message
From
17/11/2002 20:47:01
 
 
To
17/11/2002 10:38:22
Bob Tracy
Independent Consultant
Driftwood, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00723643
Message ID:
00723692
Views:
12
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
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform