C# 无法获取存储过程结果

C# 无法获取存储过程结果,c#,sql-server,C#,Sql Server,在带有游标的存储过程中,我得到了结果,但当我试图将该值放入表中时,却无法得到它。请帮帮我 这是我的C代码 string sql = "ForTaxReport"; tdsTPDPay.TaxReportRow dataRowLog = new tdsTPDPay.TaxReportDataTable().NewTaxReportRow(); if (base.Transaction != null) { base.Command = new SqlCommand(sql, base.C

在带有游标的存储过程中,我得到了结果,但当我试图将该值放入表中时,却无法得到它。请帮帮我

这是我的C代码

string sql = "ForTaxReport";
tdsTPDPay.TaxReportRow dataRowLog = new tdsTPDPay.TaxReportDataTable().NewTaxReportRow();

if (base.Transaction != null)
{
    base.Command = new SqlCommand(sql, base.Connection, base.Transaction);
}
else
{
    base.Command = new SqlCommand(sql, base.Connection);
}

base.CommandType = CommandType.StoredProcedure;
base.Parameters.AddWithValue("@PayrollDate", GetNull(date));
base.Parameters.AddWithValue("@ID", GetNull(ID));

base.OpenConnection();
SqlDataAdapter adp = new SqlDataAdapter(base.Command);
tdsTPDPay.TaxReportDataTable dt = new tdsTPDPay.TaxReportDataTable();
adp.Fill(dt);
return dt;

您得到了什么错误/异常?没有。但是我无法得到结果。然后您还需要显示存储的过程代码。”“Nothing”表示存储过程中的select语句未找到匹配项。存储过程返回行。但当我将该数据填充到dt表中时,它无法显示