DataTable and Serialization

Armjamil

New member
Joined
Nov 8, 2005
Messages
4
Programming Experience
1-3
DataTable and Serialization [Resolved]

I have couple of DataTables that I would like to Serialize and save them to disk. In addition to these, I also have 3 custom serializable classes.
What I would like to know is, how to proceed in saving these objects and Datatables to disk.
I can save the objects (classes) but how would I go about serializing the Datatables?

Any help will greatly be appreciated.

Thanks,
 
Last edited:
Your best bet for serializing DataTables is via a DataSet. You could put each DataTable in its own DataSet or the same one, then just call WriteXml and ReadXml to serialize and deserialize.
 
Thanks for replying!
I tried serializing datatables directly and it appears to work. haven't tried deserializing yet, but hoping that it would work also.

Thanks once again for your help!
 
Back
Top