Only 8000 characters. No more
Nathan H. Omukwenyi
> is there any limit to how long of a string SqlDataReader.GetString() can
> return?
Dan Guzman - 24 Apr 2006 02:25 GMT
I don't believe there is a limit other than available memory.

Signature
Hope this helps.
Dan Guzman
SQL Server MVP
> Only 8000 characters. No more
>
> Nathan H. Omukwenyi
>
>> is there any limit to how long of a string SqlDataReader.GetString() can
>> return?
I believe the only limitation is the underlying data type in sql. For
example a varchar can only be max 8000 chars. but text could be up to 2
gigs.
> is there any limit to how long of a string SqlDataReader.GetString() can
> return?
Nathan H. Omukwenyi - 25 Apr 2006 21:02 GMT
Agreed. I had only tested with the varchar SQL data type. Testing with TEXT
shows that it can handle much more but reaching the maximum is taking too
much time and resources. So I suppose Dan could be right about available
memory.
Nathan H. Omukwenyi
>I believe the only limitation is the underlying data type in sql. For
> example a varchar can only be max 8000 chars. but text could be up to 2
> gigs.
>
>> is there any limit to how long of a string SqlDataReader.GetString() can
>> return?