I created a webservice to get the book details, here is the code for that.
[WebMethod]
public DataSet getBookDetails()
{
DBConnection connect = new DBConnection();
DataSet dataset = null;
try
{
dataset = connect.connectToDB();
}
catch (Exception ex)
{
ex.Message.ToString();
}
return dataset;
}
Where DBconnection class , connect to the database and connectTpDB method returns the book details in dataset. it is working fine in console application,
When I call this methos in this webmethod, it gives following wsdl file,
xml
version="1.0" encoding="utf-8" ?>
<DataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:nil="true" xmlns="http://tempuri.org/"
/>
Is it correct? feel something wrong with that.
could someone please help me out on this?
Is it correct? feel something wrong with that.
could someone please help me out on this?

Dipen LamaRank #3,323 · 432 reputationPosted Nov 10, 2009, 12:16 PM EST
Purushottam RathoreRank #120 · 18.2K reputationPosted Nov 12, 2009, 2:34 AM EST
public DataSet GetUserId()
{
SqlConnection con = new SqlConnection("Data Source = (local); Initial Catalog = databasename; User ID = userid; Password = password;");
string cmd = "select * from tablename";
SqlDataAdapter da = new SqlDataAdapter(cmd, con);
con.Open();
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
return ds;
}
suthakaran sivabalan18 reputationPosted Nov 12, 2009, 5:35 AM EST
out. Thanks a lot..
Purushottam RathoreRank #120 · 18.2K reputationPosted Nov 16, 2009, 10:13 PM EST
Thanks