I get that error when I try to debug my program. Searched for this error but could not really figure it out on my own. Also when I try to connect my database I get this error "error: 26 - Error Locating Server/Instance Specified
".
public DataTable ReadData(string st_proc, SqlParameter[] param)
{
SqlCommand command = new SqlCommand();
command.CommandType = CommandType.StoredProcedure;
command.CommandText = st_proc;
command.Connection = conn;
if (param != null)
{
command.Parameters.AddRange(param);
}
SqlDataAdapter db = new SqlDataAdapter(command);
DataTable dt = new DataTable();
db.Fill(dt);
return dt;
}