ds.GetXml() - out of memory error when converting huge data sets

G

Guest

I am converting huge data sets into XmlTextDocument

DataSet ds = GetDataSetFromSomewhere()

string XmlText = ds.GetXml(); <-- Gives me "out of memory.." erro

What do I do? Is it a bug or just a limitation of the "string"
Any work around

Thank

Alexe
 
M

Miha Markic

Hi,

string is limited only with memory available to OS - IOW not limited.
How big is your dataset anyway?
Could be that your OS is running low on memory?
 
G

Guest

Probably that is not the string because I tried this code too

DataSet ds = GetDataSetFromSomewhere()

ds.GetXml(); <-- Gives me "out of memory.." erro

still the same error (of course GetXml() function might create a temp string anyway...

The size of the XML stream is 7.75802E+07. The memory itself is ok otherwise how would DataSet be stored in memory

What is funny that this code worked

MemoryStream ms = new MemoryStream()
ds.WriteXml(ms,XmlWriteMode.IgnoreSchema)

float t = (float)ms.Length

ms.Close()

....

----- Miha Markic wrote: ----

Hi

string is limited only with memory available to OS - IOW not limited
How big is your dataset anyway
Could be that your OS is running low on memory
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top