Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating SQL server via Updategrams
Message
De
10/10/2004 20:15:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00950289
Message ID:
00950304
Vues:
11
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform