Ok here is where I am at.... I have created a web service in vs 2005. I
have tested it and have been able to bind the content to a
gridview....... below is my code:
using System.Data.SqlClient;
/// <summary>
/// Summary description for dbconn
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class dbconn : System.Web.Services.WebService {
[WebMethod]
public DataSet GetTitleAuthors()
{
SqlConnection myConnection = new SqlConnection("Data
Source=JEREMY1;Initial Catalog=pubs;User ID=sa;Password=beth123");
SqlDataAdapter myCommand1 = new SqlDataAdapter("select * from
Authors", myConnection);
// SqlDataAdapter myCommand2 = new SqlDataAdapter("select * from
Titles", myConnection);
DataSet ds = new DataSet();
myCommand1.Fill(ds, "Authors");
// myCommand2.Fill(ds, "Titles");
return (ds);
}
I have downloaded the "Microsoft Offiec 2003 Web Service" a have
installed it.....
I am able to add the web service and it creates the necesary file
In excel I create a button and add the following code
Dim wsAuthors As New clsws_dbconn
Dim value As String
value = wsAuthors.wsm_GetTitleAuthors()
To be honest I am not sure how to return the 23 records that are in the
ds to the excel grid... any help or bump in the right direction would
be helpful
|