i have used the following code(which is straight from the msdn) to try this
: how ever this and anyother method that i have tried only give me a
An unhandled exception of type 'System.Invalid CastException' occurred in
system.data.dll
Additional information: Specified cast is not valid.
does anyone have any ideas on what is going wrong?
WStoreyII
Thanks again
Private Sub WriteSchemaWith XmlTextWriter(t hisDataSet As DataSet)
' Set the file path and name. Modify this for your purposes.
Dim filename As String = "mySchema.x ml"
' Create a FileStream object with the file path and name.
Dim myFileStream As New System.IO.FileS tream _
(filename, System.IO.FileM ode.Create)
' Create a new XmlTextWriter object with the FileStream.
Dim MyXmlTextWriter As New System.Xml.XmlT extWriter _
(myFileStream, System.Text.Enc oding.Unicode)
' Write the schema into the DataSet and close the reader.
thisDataSet.Wri teXmlSchema(MyX mlTextWriter)
MyXmlTextWriter .Close()
: how ever this and anyother method that i have tried only give me a
An unhandled exception of type 'System.Invalid CastException' occurred in
system.data.dll
Additional information: Specified cast is not valid.
does anyone have any ideas on what is going wrong?
WStoreyII
Thanks again
Private Sub WriteSchemaWith XmlTextWriter(t hisDataSet As DataSet)
' Set the file path and name. Modify this for your purposes.
Dim filename As String = "mySchema.x ml"
' Create a FileStream object with the file path and name.
Dim myFileStream As New System.IO.FileS tream _
(filename, System.IO.FileM ode.Create)
' Create a new XmlTextWriter object with the FileStream.
Dim MyXmlTextWriter As New System.Xml.XmlT extWriter _
(myFileStream, System.Text.Enc oding.Unicode)
' Write the schema into the DataSet and close the reader.
thisDataSet.Wri teXmlSchema(MyX mlTextWriter)
MyXmlTextWriter .Close()
Comment