Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating SQL server via Updategrams
Message
From
10/10/2004 20:15:39
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00950289
Message ID:
00950304
Views:
10
You can use an XMLAdapter DiffGram and apply it to a CursorAdapter something like:
Client Side:

loXAD = CREATEOBJECT("XMLAdapter")
loXAD.AddTableSchema("myview")

REPLACE myview.somefield WITH "Hello World"

loXAD.IsDiffgram = .T.
loXAD.ToXML("lcXML", "", .F., .T., .T.)  && here's your diffgram in lcXML
RELEASE loXAD

Server Side:

loXAD = CREATEOBJECT("XMLAdapter")
loXAD.LoadXML(lcXML) && load lcXML from client side

loCAD = NEWOBJECT(lcClass, lcClassLib)  && the "myview" cursoradapter
loXAD.Tables(1).ApplyDiffgram("", loCAD)
>Ok.. I'm able to update SQL server 2K using cursor adapters.. but now I'm wondering whether it wouldn't be more straightforward to use updategrams...
>
>What is involved in updating SQL Server 2k using updategrams?
>1. What changes would I need to make to the updategram VFP8 generates?
>2. Is there any tool/simple way to generate the required Annotated Schema? or do I need to do this by hand?
>3. What is involved in sending the resulting xml to SQL Server? Can I use the same setup used for applying cursor adapters.. or is something more needed?
>
>Anyone have any experience with this?
>
>Ilmar
- Jeff
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform