并非所有的路径都返回值
public SqlDataReader GetDataSetByStr(string str)
{
try
{
objSqlCon.Open();
objSqlCom = new SqlCommand(str, objSqlCon);
objSqlCom.CommandType = CommandType.Text;
objSqlDataReader = objSqlCom.ExecuteReader();
return objSqlDataReader;
}catch (Exception e2)
{
Console.WriteLine(e2.Message);
}
finally
{
if (objSqlCon != null)
{
objSqlCon.Close();
}
}
}
错误提示:BookManage。DataAccess.GetDataSetByStr(string ) 并非所有的路径都返回值