-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: LovedJohnySmith
Message 2 in Discussion
When you create the Web service proxy that uses Typed DataSet, the Typed
DataSet does not correctly import secondary schemas. Instead of using the
expected secondary schema, the returned schema imports a schema with an
arbitrary name such as _app1.xsd. Because of an incorrect secondary schema
name, the tools such as WSDL.exe or Microsoft Visual Studio .NET cannot
correctly create a proxy for the Web service. Also, the returned XML cannot be
serialized back to a corresponding Typed DataSet instance. If you try to do
this, the result is an XmlSchemaException. To work around this problem,
return the Typed DataSet that you want as an XmlElement in your WebMethod. In
your client, you can explicitly load the returned XML to an instance of the
Typed DataSet that you want. The following code is an example for WebMethod:
[WebMethod]
public System.Xml.XmlElement GetTypedDataSet ()
{
// Create an instance of Typed DataSet.
MyTypedDataSet myDs = new MyTypedDataSet ();
// Add some data to the DataSet.
System.Data.SqlClient.SqlConnection myCn =new
System.Data.SqlClient.SqlConnection("Persist Security Info=False;User
ID=<username>;Password=<password>;Initial Catalog=pubs;Data
Source=SQLServer;Packet Size=4096");
myCn.Open();
System.Data.SqlClient.SqlDataAdapter myDa = new
System.Data.SqlClient.SqlDataAdapter("Select * from Employee", myCn);
myDa.Fill(myDs, myDs.Tables[1].TableName);
// Return the DataSet as an XmlElement.
System.Xml.XmlDataDocument xdd = new System.Xml.XmlDataDocument (myDs);
System.Xml.XmlElement docElem = xdd.DocumentElement;
return docElem ;
} If you still not clear with this.. please see the following URL.
http://support.microsoft.com/default.aspx?scid=kb;en-us;317340 I hope, this
will solve ur problem thanx, Smith
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]