Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing data from a VFP app to a .NET web service
Message
General information
Forum:
ASP.NET
Category:
Web Services
Miscellaneous
Thread ID:
00870973
Message ID:
00872545
Views:
14
Franco,

There are many classes in the .NET Framework and it can be hard to find the one you are looking for. I'm glad that worked for you.

>Many thanks Cathi, it works.
>I didn't find the StringReader in the docs and so was unable to fill the dataset from a string.
>There are so many classes/object, ecc. in .NET that sometimes it's hard to find a specific "item", even it's a simple one!
>I have to use VFP7 in this project, so I can't use XMLAdapter.
>
>Thanks again, bye
>
>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=0301092
>>
>>When 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();
>>// cXML is the string of XML to read
>>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.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform