470,833 Members | 1,946 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

is there any limit to how long of a string SqlDataReader.GetString() can return?

is there any limit to how long of a string SqlDataReader.GetString() can
return?
Apr 19 '06 #1
1 2992
Why do you ask? The answer is probably "It depends"

On the one hand there is little practical limit to the size of a .NET
managed string type. You can easily read a several megabyte file into a
single string, for example.

On the other hand there very well may be a server-side limit to the size of
the data you are retrieving using SqlDataReader. For example, if you are
reading a SQL Server table that has a cell declared as a NVARCHAR(4000). In
those cases GetString() is going to return strings with some (ultimately)
finite size.

"Daniel" <so*******************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
is there any limit to how long of a string SqlDataReader.GetString() can
return?

Apr 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Catalin Porancea | last post: by
9 posts views Thread by Andy Sutorius | last post: by
1 post views Thread by theintrepidfox | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.