the Size property has an invalid size of 0 : MS SQL
4 December 2008
1,495 views
No Comment
I was working on calling a MS SQL stored procedure from a .NET application. Then I got this error “the Size property has an invalid size of 0″.
Looking over I saw I have a return variable of VARCHAR type. And that does not have a size specified. Just adding the size got it working.
Here is an example code:
param = command.Parameters.Add(“@clientName”,SqlDbType.VarChar,150);
param.Direction = ParameterDirection.Output;










Leave your response!