如何将参数发送到stimulsoft中的存储过程? [英] How do i send parameters to stored procedure in stimulsoft?
问题描述
public virtual ActionResult GetReportSnapshot()
{
var data = (ComparativeBalanceReportDS) TempData["ComparativeSession"];
StiReport report = new StiReport();
report.Load(Server.MapPath("~/Content/StimulReports/SampleReport.mrt"));
report.Compile();
report["fromDocumentNumber"] = "1";
report["toDocumentNumber"] = "85";
return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);}
i有存储过程并执行设计师,但我不发送参数,当运行App =>错误:SqlCommand.Prepare方法要求所有可变长度参数都具有显式设置的非零大小。
i have stored procedure and execute in designer but i do not send parameters to it and when run App=> Error:SqlCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.
推荐答案
我有存储过程并在设计器中执行,但我不向它发送参数,当运行App =>错误: SqlCommand.Prepare方法要求所有可变长度参数都具有显式设置的非零大小。
i have stored procedure and execute in designer but i do not send parameters to it and when run App=> Error:SqlCommand.Prepare method requires all variable length parameters to have an explicitly set non-zero Size.
此错误与 Sql命令
类有关。您需要指定参数的长度。检查 SqlCommand.Prepare方法 [ ^ ]。
在查看报告之前,只需确保从存储过程的输出中获取任何数据。
This error is related to Sql command
class. You need to specify the length of parameters. Check SqlCommand.Prepare Method[^].
Before viewing report, just ensure you're getting any data from stored procedure's output.
这篇关于如何将参数发送到stimulsoft中的存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!