ReadXML and WriteXML contains byte[]

Joined
Mar 19, 2010
Messages
2
Reaction score
0
Hi,

I have this datatable and one of the columns is byte[] to store image. I use writeXml function to write the datatable data into .txt file.

When i read back the .txt file to get the XML and put it in dataset (using readXML), that column's datatype becomes string. and how can i convert it back to byte[]?

Could somebody help me please? Thanks in advance for your help.

Regards,
-Lidya
 
Joined
Mar 19, 2010
Messages
2
Reaction score
0
Hi Guys,

I figured it out.

When i write the the datatable to .txt file using writeXML, the value in the byte[] column is saved as Base64String.

So when i read it using ReadXML, i just need to re-convert it back to bytes again by using Convert.FromBase64String(value);

Thanks anyway.

-Lidya
 

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