【发布时间】:2010-06-14 09:59:40
【问题描述】:
我想为我的存储过程提供一个输出参数。此输出过程返回byte[]。我该怎么做呢?
如果我执行以下操作:
command.Parameters.Add(new SqlParameter("@Bytes", SqlDbType.VarBinary));
command.Parameters[1].Direction = ParameterDirection.Output;
我明白了:
System.InvalidOperationException: Byte[][1]: the Size property has an invalid size of 0. This stored proc works fine in SQL Server when I execute it via the SSMS option "Execute Stored Procedure).
有什么想法吗? 谢谢
【问题讨论】:
标签: c# sqlparameter