N
needin4mation
Hi, I have a webservice that just returns a count:
public DataSet HelloWorld()
{
OdbcConnection conn = new OdbcConnection("DSN=xxx");
String sqlString = "select count(*) as employee from employees";
DataSet myResults = new DataSet();
OdbcDataAdapter myAdapter = new OdbcAdapter(sqlString, conn);
myAdapter.Fill(myResults);
return myResults;
}
In my page that consumes the web service I have this:
on a button click
localhost.Service1 GetCount = new locahost.Service1();
Label1.Text = Convert.ToString((DataSet) GetCount.HelloWorld());
Now that returns is this:
System.Data.DataSet
in my label. How do I get the data in the label? If I run the
webservice itself I get my count, so I know that part is working.
Thank you for any help.
public DataSet HelloWorld()
{
OdbcConnection conn = new OdbcConnection("DSN=xxx");
String sqlString = "select count(*) as employee from employees";
DataSet myResults = new DataSet();
OdbcDataAdapter myAdapter = new OdbcAdapter(sqlString, conn);
myAdapter.Fill(myResults);
return myResults;
}
In my page that consumes the web service I have this:
on a button click
localhost.Service1 GetCount = new locahost.Service1();
Label1.Text = Convert.ToString((DataSet) GetCount.HelloWorld());
Now that returns is this:
System.Data.DataSet
in my label. How do I get the data in the label? If I run the
webservice itself I get my count, so I know that part is working.
Thank you for any help.