PC Review


Reply
Thread Tools Rate Thread

Newbie Question open a web service in excel

 
 
Chicagoboy27
Guest
Posts: n/a
 
      8th Nov 2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Web Service newbie question Hitesh Kanwathirtha Microsoft ASP .NET 1 9th Mar 2006 03:28 AM
Newbie Web Service question Bryan Dickerson Microsoft VB .NET 4 17th Jun 2005 02:49 PM
Really basic web service newbie question... Mark Rae Microsoft C# .NET 2 13th Jun 2004 12:17 AM
[newbie] Web Service always open source? =?Utf-8?B?R29yZG9uIEtub3Rl?= Microsoft Dot NET 4 1st Jun 2004 12:51 PM
Newbie Cluster Service Question Dave Microsoft Windows 2000 Advanced Server 2 7th Oct 2003 11:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:52 PM.