473,388 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Max Size for DataTable

Don't ask why...
But I want to loop through all my records in the MySQL table (5 million
records) and do a data integrity check (along with some other update
functions). I'm wondering if there is a max size for the datatable. Or if
there is a better way. It seems I loose my connection if I try to get 1
million rows...
Here's the code...

Dim _connMySQL As New MySqlConnection(_strConn)
_connMySQL.Open()

If Me.txtJob.Text.Length > 0 Then
Me.lblStatus.Visible = True
strSQL = "SELECT * " & _
" FROM Import"
'dtImport = DataClass.GetMySQLDataTable(strSQL,
"Import")
Dim dtImport As New DataTable("Import")
Dim _da1 As New MySqlDataAdapter(strSQL, _connMySQL)
_da1.Fill(dtImport)
_da1 = Nothing
_connMySQL.Close()

For Each dr In dtImport.Rows
' blah blah
Next
End If
_connMySQL.Close()

-bruce duncan

Nov 21 '05 #1
1 3948
Bruce,

It is in my opinion certainly not the best way, I would just loop through it
using the MySqldatareader (I don't know if it exist however should be
because that is the basic for the Fill in the SQLDataadapter).

There is as well a SQLConnection.Timeout that can be set, what I don't know
as well for mySQL. In SQL you should never set that to zero, because that
means forever.

I hope this helps something,

Cor
Nov 21 '05 #2

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

Similar topics

0
by: David Laplanet | last post by:
I have a situation when calling a constructor with a lot of parameters. In the following code, I create a System.Data.DataTable instance. I run this code step by step in debug mode and I have...
2
by: tshad | last post by:
I am getting the error: **************************************************************************** Array does not have that many dimensions. Description: An unhandled exception occurred during...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
4
by: Dennis | last post by:
Is there any way to get the memory size for an instance of an object, like in bytes or something like that. I have an UNDO feature on one of my applications and I'd like to be able to display a...
5
by: tshad | last post by:
I have a table with an image in it that is larger that the width and height. <table class="dataTable" width="500px" height="400px" border="0" cellpadding="0" cellspacing="0"> <tr height="400px"...
1
by: =?Utf-8?B?UnlhbiBBbmRydXM=?= | last post by:
Does the int index of the DataTable.Rows collection place a size limit on how large a datatable can be? If not then how do you index DataTable.Rows for sizes greater than what an int can handle?
5
by: Gary Townsend | last post by:
I have been working on a way to take a datatable from a dataset and transform it into a Geography Markup Language(GML) stream so it can be loaded into another component. The problem i'm finding is...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have a datatable that i'm keeping in application state only to be used by my datalayer class. i have to cast it from my code-behind and pass it to my datalayer on each postback. any...
1
by: Avi | last post by:
Hi all, I would like to remove the oldest rows beyond a predefined size from a DataTable. Is it possible to remove a bulk of rows in one shot or do I have to loop and do a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.