c# - Supplying output parameter to sqlparametercollection resulting in error (Varbinary) -
I want to supply output parameter to my stored proc, return this output process byte []
Used to be. How do I do this?
If I do the following:
command Parameter. Add (new SQLPamator ("@Bytes", SQLDB type.ubblery)); Command. Parameter [1]. Direction = Parameter Direction Output;
I get:
system. Infinite Operation Exception: Byte [] [1]: Size is an invalid size of 0. This stored work works well in SQL Server when I execute the SSMS option "execute the stored procedure".
Any ideas? Thank you
You must provide a value for the size parameter:
New SqlParameter ("@bytes", SqlDbType.VarBinary, 8000)
Comments
Post a Comment