Serialization is your friend here, have a look at the DataSet
WriteXML
and
ReadXML
methods
That will let you convert your dataset into a string
From
an article on eggheadcafe[
^]...
Now developers who've worked with Binary Serialization know that the ADO.NET DataSet describes itself to the Serialization Framework only in XML. You run a DataSet through the BinaryFormatter and what you get is a very large byte array filled with -- you guessed it -- a whole glop full of textual XML!
So, make sure you set your dataset formatting to Binary
http://weblogs.asp.net/skoganti/archive/2004/08/30/222525.aspx[
^]
You should then be able to send your dataset over sockets are deserialize at the other end
Have a google for 'DataSet binaryformatter' for more information on this subject