How can I retrieve a column of datatype Varchar(MAX) from a SQL Server database in C#?
I don’t think SqlDataReader helps retrieve it.
Any clue?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s just a string field …. just grab it like any other string…..
There’s really nothing special about the
VARCHAR(MAX)type – it’s just a text field, and it can hold up to 2 GB of text – just like a .NETstring. You don’t need to do anything special, like streaming or anything – just read the column into a string!