Z
Zeke Jones
If I have a field in MS SQL 2005 called "data" with type VarChar(MAX),
how do I add a parameter using the syntax below if SqlDbType doesn't
have a VarChar(MAX) type. If I use SqlDbType.VarChar will the value get
truncated or is that what I should use?
SqlCommand cmd = new SqlCommand(query, connection);
cmd.Parameters.Add("@data", SqlDbType.VarChar).Value = largeTextData;
Or am I supposed to use the size parameter?
cmd.Parameters.Add("@data", SqlDbType.VarChar, 1000000).Value =
largeTextData;
Also how many characters does VarChar(MAX) hold?
how do I add a parameter using the syntax below if SqlDbType doesn't
have a VarChar(MAX) type. If I use SqlDbType.VarChar will the value get
truncated or is that what I should use?
SqlCommand cmd = new SqlCommand(query, connection);
cmd.Parameters.Add("@data", SqlDbType.VarChar).Value = largeTextData;
Or am I supposed to use the size parameter?
cmd.Parameters.Add("@data", SqlDbType.VarChar, 1000000).Value =
largeTextData;
Also how many characters does VarChar(MAX) hold?