Home All Groups Group Topic Archive Search About
Author
20 Dec 2006 5:39 PM
ray well
i saved the state of a data set and table via

    MyDs.WriteXmlSchema("MyDs.xsd")
    MyDs.WriteXml("MyDs.xml")

i was able to read them back in and display the info in the database by

    MyDs.ReadXmlSchema("MyDs.xsd")
    MyDs.ReadXml("MyDs.xml")

i put the 2 files into my project resources and named them Descrip and Info,
but when i tried reading them back thru

    MyDs.ReadXmlSchema(My.Resources.Descrip)
    MyDs.ReadXml(My.Resources.Info)

i get the error 'Illegal characters in path'

i'm assuming it is because ReadXml expects a filename, which
'My.Resources.Descrip' is not. i was able to read in the text of
'My.Resources.Descrip' into a text box, so the content is there.

how can i make this work?

thanks

ray

Author
20 Dec 2006 11:50 PM
ray well
the solution is:

Dim sr As New StringReader(My.Resources.Descrip)

Me.MyDs.ReadXmlSchema(sr)

sr = New StringReader(My.Resources.Info)

Me.MyDs.ReadXml(sr)

and the data loads just fine from within the app.

ray

AddThis Social Bookmark Button