I am using the following code to load a DataGridView. It works fine for aup to around a million records
from a SQL database on my local machine. I need to load 2 million records, but when I try I get the following error message. Is there a better way to do this?
Dim dbadp2 As SqlDataAdapter
Dim dTable2 As New DataTable
dTable2 = New DataTable 'to make sure that columns from previous query are wiped
Dim connection As New SqlConnection(CS)
dbadp2 = New SqlDataAdapter(sSQL, connection)
e = dTable2