First I'd like to say how I hate that Visual Studios absorbs any errors in the form load event of Win7 64-Bit computers. Anyways... I have the writing the DataTable to XML down, pretty much I doing this:
However, whenever I go to load the XML I get this error:
The way I'm trying to load the DataTable is simple:
How is it that the DataTable doesn't support the schema that was created by a DataTable?
Code:
path = IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "login.xml")
Using fs As New IO.FileStream(path, IO.FileMode.CreateNew)
Dim new_table As New DataTable
new_table.Columns.AddRange({New DataColumn("id"), New DataColumn("user"), New DataColumn("pass"), New DataColumn("admin")})
new_table.TableName = "login"
Dim admin As DataRow = new_table.NewRow
admin(0) = 0
admin(1) = "admin"
admin(2) = "admin"
admin(3) = True
new_table.Rows.Add(admin)
new_table.WriteXml(fs)
End Using
Code:
DataTable does not support schema inference from Xml.
Code:
Dim dt As New DataTable
dt.ReadXml(path)