Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > problem de-serializing a dataset

Thread Tools

problem de-serializing a dataset

Posts: n/a
I have a dataset that originated as a string (passed from a C++ dll). I
de-serialize it, use the data, and then in some cases I will serialize it
again to pass as a session variable in my app and then de-serialize it
again. This generally works well, but I just hit a problem de-serializing
it. I have a vb class set up with commonly used code and have functions to
handle serialization and de-serialization.

Suddenly, I'm hitting the error:
The 'urn:schemas-microsoft-com:rowset:data' element is not declared. An
error occurred at , (9, 12).
with a dataset that has already successfully gone through this process. Not
sure what's going wrong or how to approach the troubleshooting.
Anyone got any ideas?

Here's that code that does the serialization/de-serialization:

Public Shared Function SerializeDS(ByVal ds As DataSet)
Dim MyXMLWriter As New System.IO.StringWriter, str As String

ds.WriteXml(MyXMLWriter, XmlWriteMode.WriteSchema)

str = MyXMLWriter.ToString()


MyXMLWriter = Nothing

Return str

End Function

Public Shared Function deSerializeDS(ByVal xml As String)

Dim ds As New DataSet

If Not IsNothing(xml) Then

Dim XMLRead As New System.IO.StringReader(xml)



XMLRead = Nothing

End If

Return ds

End Function

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSet and dataSet JimO ASP .Net 2 03-08-2006 02:39 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 2 10-31-2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N ASP .Net 1 10-31-2003 02:39 AM
DataSet to DataSet Joseph D. DeJohn ASP .Net 1 08-04-2003 03:25 AM