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

Hi,

I saw this link http://books.google.com.ph/books?id=PgqEEPWRBzAC&pg=PA316&lpg=PA316&dq=varbinary+max+size&source=bl&ots=sfrS_7sueX&sig=3PGrVO8ZhJZ3VRV_5CyxbX0EWCg&hl=tl&ei=pNFuSsr-G42YsgOhmOT0Ag&sa=X&oi=book_result&ct=result&resnum=6 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.
entlib.support@avanade.com