473,803 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

is there any limit to how long of a string SqlDataReader.G etString() can
return?
Apr 19 '06 #1
1 3393
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.c om> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
is there any limit to how long of a string SqlDataReader.G etString() can
return?

Apr 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3837
by: VM | last post by:
How can I limit the use of the PC's virtual memory? I'm running a process that basically takes a txt file and loads it to a datatable. The problem is that the file is over 400,000 lines long (77 MB) and after a while I get the Windows message saying that the virtual memory's getting really low. Plus the machine gets really sluggish (with multi-threading). Is it possible to use the virtual memory until it reaches a certain limit and then use...
5
2310
by: Catalin Porancea | last post by:
Whenever I try this: ____________________________________________________________________ Dim cmd_sp_payments As SqlCommand = New SqlCommand("sp_payments", con) cmd_sp_payments.CommandType = CommandType.StoredProcedure Dim CustID As SqlParameter = cmd_sp_payments.Parameters.Add("@cust_id", SqlDbType.Text) CustID.Value = strCustID Dim myReader As SqlDataReader = cmd_sp_payments.ExecuteReader() If myReader.HasRows Then
9
10531
by: Andy Sutorius | last post by:
Hi, I am receiving the error when compiling the project, "cannot implicitly convert type object to string". The error points to this line of code and underlines the dtrRecipient: objMailMessage.To = dtrRecipient; I'm not sure why I am getting this error. Below is the complete code I am working with.
9
7136
by: rsine | last post by:
I have developed a program that sends a command through the serial port to our business system and then reads from the buffer looking for a number. Everything worked great on my WinXP system, but when I tried the program on the Win98 system it will be running on, I get the following error: Cast from string "2076719" to type 'Long' is not valid I am not sure why I only get this error on the Win98 system or how to go about correcting...
5
2232
by: Tom Edelbrok | last post by:
I notice that using the SqlDataReader requires the use of ordinal field references rather than by name. For example, do while (myDataReader.Read()) Console.Write(myDataReader.GetInt32(0).ToString() + Chr(9)) Console.Write(myDataReader.GetString(2) + " " + myDataReader.GetString(1) + Chr(9)) Console.Write(myDataReader.GetString(3) + Chr(9)) if (myDataReader.IsDBNull(4)) then
1
2349
by: theintrepidfox | last post by:
Dear Group I'd be grateful if one of you can help me out with the following. I'd like to load a resource string dynamically e.g. Resources.Default.aspx.mnuNavigation1 should load the corresponding string. The enumerator of the resource string to load is a row ID in a database e.g. 1,2,3 etc which is appended to Resources.Default.aspx.mnuNavigation. It works so far that it poulates the text property of each menu item with the...
1
1335
by: Daniel | last post by:
is there any limit to how long of a string SqlDataReader.GetString() can return?
0
1470
by: Daniel | last post by:
how does ado.net SqlDataReader.GetString() know which encoding to read the data into a string as? Does sql sever set this at the column data type level, server wide encoding setting, os encoding?
13
17635
by: Eps | last post by:
Hi there, I believe all strings in .net are unicode by default, I am looking for a way to remove all non ascii characters from a string (or optionally replace them). There is an article on code project which kind of looks like it does what I want but I can't help thinking it makes it more complex than it needs to be.
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6840
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4274
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2968
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.