Serialize a DataSet to a string?

G

Guest

I have a dataset (with one table in it) that I want to serialize into string
data to store out on a SQL server DB. Here are my questions:

1.) Does anybody have some code that can do this? I saw there was a
serialize method that uses a streamwriter, but I need a code example. ie;
something like this... ViewState("Recipe_DataSet_Table_Serialized") =
gdsDataSet.Tables(0).DataSet.WriteXmlSchema()

2.) What type of field can I use on the database to store a bif xml string
of data?
 
M

Miha Markic

1) Easiest method: use DataSet.WriteXml
2) I would suggest text or ntext if Sql Server 2000 or xml on Sql Server
2005.
 

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