Author: dagta | Posted on: 8/22/2008 11:28:18 AM | Views : 368

Maybe this is not a web service problem but I'm having a bunch of trouble with this.   
I have an AutoComplete.asmx file which consists only of:
<%@ WebService
Language="C#"
CodeBehind="~/Services/AutoComplete.cs"
Class="AutoComplete" %> 
In my AutoComplete.cs file, I have code to retrieve from the database as follows:
 
using (SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["DBName"].ConnectionString))
{
SqlCommand myCmd = new SqlCommand("my_SP", myConnection);
myCmd.CommandType = CommandType.StoredProcedure;
myConnection.Open();
try
...

Go to the complete details ...