I would like retrieve data from a SQL Server table containing 2M records. I am using the Devexpress GridControl and have tried a simple code like this:
DataTable dt = new DataTable();
String sqlString = "select * from LARGETABLE left join TABLEB on LARGETABLE.ID=TABLEB.PARENTID";
SqlDataAdapter da = new SqlDataAdapter(sqlString, sqlConnection);
da.Fill(dt);
bindingSource1.DataSource = dt;
...
gridControl1.DataSource = bindingSource1
When line da.Fill(dt) is executed, an OutOfMemoryException error is raised after sometime.
Microsoft Server Studio does load the table without problems and shows all 2M+ rows in the grid. Is it possible to build such a data browser in c# and load large data sets without running out of memory?