Size of varbinary(max) out param

Topics: Data Access Application Block
Jul 27, 2009 at 2:44 PM

My sp takes an output param of type varbinary(max). What should be the size mentioned in c# for the AddOutParameter?

database.AddOutParameter(dbCommand,Constants.PARAM_DOWNLOAD_DATASTRING, DbType.String, 5000));


Jul 28, 2009 at 11:40 AM


I saw this link stating that the varbinary(max) can hold up to 214748367 in bytes (2GB), so i think you can pass a value not greater than 214748367. if you would notice the int.MaxValue constant has a value of 214748367.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.