|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Max Size for DataTableBut 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 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
Microsoft not content with "dissing" just the Classic VB Developer Army....
Where to find good icons? In-place Updating in Datagrid not working Why doesn't timer tick Event for PgUp and PgDn on Form How to get current free physical memory ? modify HTML in code behind How to expose a structure to VB6 from VB.NET? Datagrid problem How to convert a Byte array to a String |
|||||||||||||||||||||||