Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a .NET Dataset to Foxpro
Message
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01019347
Message ID:
01019555
Views:
15
Eric,

I answered this on the West Wind Message Board:

http://www.west-wind.com/wwThreads/default.asp?Thread=1J80GSDFX&MsgId=1J80QSCIU

+++ Rick ---


>I'm trying to return a dataset to Foxpro using a C# web service. I found this article, http://www.west-wind.com/presentations/foxpronetwebservices/foxpronetwebservices.asp, which goes through exactly what I need to do. However its not working exactly as described. After I get the dataset down to foxpro and convert it to a local cursor, all the fields are memo fields, which Rick talks about in the article. He says to fix it you need to add this line,
Adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
to the code. However when I add that line I get a syntax error when I run the method. The solution builds fine, the syntax passes through the complier so it is syntactly correct. Only when I run the method, it gives me the syntax error. And without that line everything works fine, except all my fields are memo fields
>
>Here is the code for the web service method.
>
>string query = "getValidProcesses";
>
>SqlConnection dbConn = new SqlConnection(connStr);
>DataSet dbDataSet = new DataSet();
>
>
>SqlDataAdapter dbAdapter = new SqlDataAdapter();
>dbAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
>
>dbAdapter.SelectCommand = new SqlCommand(query, dbConn);
>dbAdapter.Fill(dbDataSet, "processes");
>return dbDataSet;
>
>
>Here is the code in VFP.
>
>local something
>something = lowatcha.GetValidProcesses()
>
>*** Grab the XML - should be a dataset
>
>loDOM = something.item.parentNode
>lcXML = loDOM.Xml
>
>LOCAL oXA AS XMLADAPTER
>oXA = CREATEOBJECT("XMLAdapter")
>
>oXA.LOADXML(lcXML,.F.,.T.)  && from string
>oXA.TABLES[1].TOCURSOR(.F.,"processes")
>
>
>Here is the error I am getting.
>
Line 1: Incorrect syntax near 'getValidProcesses'.
>
>Any help is appreciated.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform