Hi Franco,
You can also use the VFP XMLAdapter class. It allows you more control of the output of the XML and the ability to work with multiple tables. I wrote an article about it a while ago in Code Magazine. Here is the link:
http://www.code-magazine.com/Article.aspx?quickid=0301092When you need to take the string and turn it into a .NET DataSet, you use the ReadXml method of the DataSet. Here is an example:
DataSet ds = new DataSet();
ds.ReadXml(New StringReader(cXML));
Once you have the data into a DataSet, you can create either create a DataAdapter to connect to SQL Server and update from the DataSet, or manually read each record in the DataTable and perform the updates, using the SqlCommmand object.
>I need to create a VB.NET web service that must be used from a VFP application.
>The vfp application must pass a cursor to the web service which update an SQL Table
>I would like to know how to pass the data from the VFP app to the .NET web service, and how to put this data into a .NET dataset so I can update the sql server table.
>Actually I'm converting the vfp cursor into xml, then sending the xml string to the web service, but here I'm having some trouble.
>
>In the VFP application I have something like:
>
>use table in 0 shared
>cursortoxml("table","myxml")
>oWS = CREATEOBJECT("MSSOAP.SoapClient")
>oWS.MSSoapInit("
http://theserver/ws.wsdl")
>oWs.UpdateRow(myxml)
>release oWs
>
>In the webservice I have a webmethod as following:
>
>WebMethod(Description:="Update row", EnableSession:=False) _
> Public Sub UpdateRow(ByVal lcStr As String)
>
> ' in this method I'd like to Fill the dataset with the data contained in the lcStr parameter
> ' and update the SQL-Server table
>
> End Sub
>
>How can I do?
>Thanks in advance
>
>Franco
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi