Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid - loading/saving large datasets as xml

Status
Not open for further replies.

jcisco2

Programmer
Apr 13, 2004
102
US
I'm having issues on reading in large amounts of data (about 713,162 KB) into a dataset. When I try to it takes a really long time to load, and i get an out of memory exception. Is there better way to view large datasets offline? This data is sales data thus the size.

Code:
'gl vars
 Private dSet As New DataSet

'save button 
 dSet.WriteXml("c:\offline.xml")
...

'load button
 dSet.ReadXml("c:\offline.xml")
            MsgBox("done")
            Me.UlGrid1.DataSource = dSet
            Me.UlGrid1.DataBind()

cheers,
 
I am having the same problem for ages,

The DataSet needs to read the hole xml file to be able to understand the structure of the database.

The only thing that i could think of (wouldn't solve my problem), is to split the dataset up. But this is not very practicle in most situations.

Have you looked a Binary Serialization?
It can be a little faster.
 
thanks for the info. Here is what I went with. I'm now storing a large sub set of my data in excel (right now it's like 30,000 rows. Think excel has a max row size of ~63,000+ rows. Then I query off excel via a OleDbDataAdapter this works very fast over the xml.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top