Error: not all code paths return a value ???
hi
can someone please tell me where i am going wrong in my code and why i am getting an error of this kind..
protected SqlDataReader BindState()
{
SqlConnection myConnection = new SqlConnection(ConnStr);
SqlCommand myCommand = new SqlCommand("sp_das_state_sel",myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
try
{
myConnection.Open();
return (myCommand.ExecuteReader(CommandBehavior.CloseConnection));
}
catch (SqlException SQLexc )
{
Response.Write(SQLexc.ToString());
}
finally
{
myConnection.Close();
myCommand.Connection.Close();
}
}
thanks.. :)