Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a .NET Dataset to Foxpro
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Titre:
Returning a .NET Dataset to Foxpro
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01019347
Message ID:
01019347
Vues:
123
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform