110,538
社区成员
发帖
与我相关
我的任务
分享
Db.AddInParameter("@first_date", DbType.String, StartDate.ToString());
Db.AddInParameter("@Last_date", DbType.String, EndDate.ToString());
Db.AddOutParameter("@error_string", DbType.String, "ok", 255);
Db.ExecuteNonQuery("sp_Stock_Statist", CommandType.StoredProcedure);
string Rst = Db.Parameters["@error_string"].Value.ToString();
if (Rst=="ok")
{
return TableOperator.GetDataTable<dsResult.month_statistDataTable>();
}
else
{
throw new Exception(Rst);
}
if @@error <> 0
begin
select @error_string = 'xxxx时出错!'
rollback tran
return
end
if (Rst=="ok")
{
//返回 查询你的表
}
else
{
throw new Exception(Rst);
}