Dear All, I have a test web service installed and working fine even though it only returns 'Hello World'. I now want to access my SQL server 2005 database's on asp.net via the web service. Does anyone have any sample vb.net or c# code to do this Many Thanks Chris Anderson
The code is actually the same as w/ asp.net see http://kb.discountasp.net/article.aspx?id=10018 Bruce DiscountASP.NET www.DiscountASP.NET
if you are using the test code in the KB, you probably didn't put in this line (make sure you replace the select statement.) dbCMD = new sqlcommand ("select * from tblTest",dbconn) Bruce DiscountASP.NET www.DiscountASP.NET
Bruce, Ive tried the code. At the line: dtr = dbCMD.ExecuteReader() I get an error: (using catch ex as exception): ExecuteReader: command text property has not been initialised Any ideas please ? Regards Chris Anderson