Parameter Type/Size Property Values for VARCHAR(MAX) Stored Proc Parameter

  • Thread starter Thread starter jcpc
  • Start date Start date
J

jcpc

I have a SQL Server stored proc with a VARCHAR(MAX) output parameter.
What are the corresponding SqlParameter sqlDbType and size values?
 
I have a SQL Server stored proc with a VARCHAR(MAX) output parameter.
What are the corresponding SqlParameter sqlDbType and size values?

SqlDbType.VarChar and then either omit the size or specify
it as -1.

Arne
 
Thanks, Arne! I never would have guessed (and haven't found it in any
documentation) that -1 can be used to imply a "max" value. I had
tried using a varchar parameter without the size value, but that works
only if direction = input.
 
Back
Top