并非所有的路径都返回值
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 ) 并非所有的路径都返回值
{
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 ) 并非所有的路径都返回值
...全文
相关推荐
函数的返回值为什么只能有一个
本资料为一些常见的keil c51编程及调试时出现的问题,简单明了,帮助您更好的编程
解决python 执行shell命令无法获取返回值的问题
问题背景:利用python获取服务器中supervisor状态信息时发现未能获取到返回值。 python获取执行shell命令后返回值得几种方式: # 1.os模块 ret = os.popen(supervisorctl status) ret_data = ret.read() # 2.subprocess模块 ret = subprocess.Popen('supervisorctl status',shell=True,stdout=subprocess.PIPE) out,err = ret.communicate() # 3.commands模块 ret_data = com
Postman动态获取返回值过程详解
主要介绍了Postman动态获取返回值过程详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
GetLastError()返回值的含义
GetLastError()返回值的含义
shell脚本返回值问题的解决
主要介绍了shell脚本返回值问题的解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧



