Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing DataSets to .NET
Message
De
24/01/2005 09:44:54
 
 
À
24/01/2005 04:39:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00978183
Message ID:
00979981
Vues:
38
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform