ReadXml from resources

R

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
 
R

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
 

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