Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting a vfp7 cursor to c# dataset
Message
De
13/12/2005 17:29:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
01077592
Message ID:
01077672
Vues:
44
>I'm calling a c# web service (vs 2005) from vfp7. What I have to do is: (1) Convert vfp7 cursor to xml, (2) pass the xml string to the ws method, and (3) create dataset from the xml string.
>
>Code in vfp7 side:
>----------------------
>
>o = CREATEOBJECT("MSSoap.SoapClient")
>
>=o.MSSoapInit("http://localhost:2947/ChangeBomSkuProcess/Service.asmx?WSDL")
>=CursorToXML("CsrAllSkus", "cTestxml")
>?o.UpadateOrderDetailComponent(cTestxml)
>
>
>code in c# side:
>---------------------
>
>[WebMethod]
>public bool UpadateOrderDetailComponent(string xmlRplSkus)
>{
> XmlDataDocument xmlDataDocument = new XmlDataDocument();
> xmlDataDocument.LoadXml(xmlRplSkus);
> DataSet ds = xmlDataDocument.DataSet;
> .
> .
> .
> return true;
>}
>
>
>Now, when I step thru the code in C#, in the watch window ds is of type dataset. But the dataset is empty.
>
>Am I using the right command to convert the xml string to a dataset?


XmlDataDocument xmlDataDocument = new XmlDataDocument();
DataSet ds = xmlDataDocument.DataSet;
ds.ReadXml(xmlRplSkus);

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform