G
Guest
I have a database that holds large varchar data. The table has a column of
type varchar(8000). The stored procedure that is called to add the data to
the table also has a paramater of type varchar(8000). The stored procedure
is wrapped within a .net web service. I would like the web service to check
the length of the data passed to it and throw an exception if the data is
greater than 8000 characters long. But I don't want to hard code the 8000
byte limit into the web service. .net has MaxValue properties for simple
datatypes like int. System.Data.SqlDbType.VarChar.MaxValue does not exist,
however. Is there a way to get the maximum length of the VarChar datatype
from .net or better yet, the maximum accepted length of a varchar parameter
of a particular stored procedure?
type varchar(8000). The stored procedure that is called to add the data to
the table also has a paramater of type varchar(8000). The stored procedure
is wrapped within a .net web service. I would like the web service to check
the length of the data passed to it and throw an exception if the data is
greater than 8000 characters long. But I don't want to hard code the 8000
byte limit into the web service. .net has MaxValue properties for simple
datatypes like int. System.Data.SqlDbType.VarChar.MaxValue does not exist,
however. Is there a way to get the maximum length of the VarChar datatype
from .net or better yet, the maximum accepted length of a varchar parameter
of a particular stored procedure?