Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read binary data from XML file
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Read binary data from XML file
Miscellaneous
Thread ID:
01067905
Message ID:
01067905
Views:
60
I have a table with a few VarBinary columns. I use code similar to the following code, to write the contents of a dataset (that was populated with data from the table menthioned earlier) to an XML file:
this.oDS.WriteXml(sMyFile, XmlWriteMode.WriteSchema);
Now I want to read the data from the XML file and I use code similar to this:
DataSet oDS = new DataSet("ds");
oDS.ReadXml(sMyFile);
byte[] ba = (byte[]) oDS.Tables[0].Rows[0].ItemArray[6];
Is this the best way to get the binary data out as a byte array (byte[])?

Is there any thing that I should be aware of when putting binary data into a dataset?

Einar
Semper ubi sub ubi.
Reply
Map
View

Click here to load this message in the networking platform