Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing DataSets to .NET
Message
From
24/01/2005 09:44:54
 
 
To
24/01/2005 04:39:26
General information
Forum:
Visual FoxPro
Category:
Web Services
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00978183
Message ID:
00979981
Views:
31
Oh!! I didn't realize that you were attempting to pass a DataSet to your WebService method ... I think you neglected to mention that earlier. That's a no-no. You should be passing an XML string.
[WebMethod]
public string AnalyseMyData(string XMLCheckMe)
{
    DataSet dsCheckMe  = new DataSet();
    StringReader sr = new StringReader(XMLCheckMe);
    dsCheckMe.ReadXml(sr, XmlReadMode.InferSchema);
    dsCheckMe.AcceptChanges();

}
~~Bonnie


>But the dataset is a parameter on my WebService function. The function doesn't even get called properly, I get the SOAP error and the .NET debugger doesn't even fire :(
>
>Here is my function
>
>
>[WebMethod]
>public string AnalyseMyData(DataSet dsCheckMe)
>{
>  //here we just need to return a string detailing the contents of the passed dataset
>  string lcBlurb = string.Empty;
>
>  //say how many tables
>  lcBlurb += "DataSet Contains " + dsCheckMe.Tables.Count.ToString() + " 
Tables : " + Environment.NewLine;
>
>  for (int i = 0; i < dsCheckMe.Tables.Count; i++)
>  {
>      lcBlurb += "\tTable " + Convert.ToString(i+1) + " is called " + 
dsCheckMe.Tables [i].TableName + " and has " + dsCheckMe.Tables[i].Rows.Count.ToString() + 
" Records" +  Environment.NewLine;
>  }
>  return lcBlurb;
>}
>
>
>Am I able to put constraints on this? Would I have to specify them from VFP?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform