What SqlDbType maps to varChar(max)? SqlDbType.VarChar says that it is limited to 8K, though that may be a documentation error.
A:
Use SqlDbType.Text
.
VARCHAR(MAX)
is actually improved TEXT
from older versions of MS SQL
. It differs from VARCHAR
significantly.
Quassnoi
2009-02-27 19:34:08
+1
A:
Actually you can use it with VarChar. If it is a parameter you can build it with: new SqlParameter("@myparam", SqlDbType.NVarChar, -1)
eglasius
2009-02-27 20:10:39
Do I have to pass a size of -1 or can I just leave it blank?
Jonathan Allen
2009-02-28 00:55:05