c# - system.outofmemoryexception When filling DataAdapter? -


i have pull 150k records db. using da.fill(ds,"query") , throwing system.outofmemoryexception.

dim dagrid new sqldataadapter(sqlcmd_q) dagrid.fill(dsgrid, "query") dagrid.dispose() 

i need datatable only. cannot use xml. because need assign mschartcontrol display scotterplot.

any suggestions?

the first thing i'd check how many columns returning, , data types are. although 150k records lot, shouldn't give oom exception unless each record 13k in length (on 32-bit machine). suggests me either returning way more fields need, or perhaps of fields large strings or binary data. try cutting down select statement return fields absolutely needed display.

if doesn't work, may need move datatable list of custom data type (a class appropriate fields).


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -