Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27340

[RESOLVED] Datatable xml serializing problem

$
0
0
Code:

If IO.File.Exists("records.xml") Then
    dt.ReadXmlSchema("records.xml")
    dt.ReadXml("records.xml")
Else
    dt.Columns.Add("Name")
    dt.Columns.Add("Appearance", GetType(Integer))
    dt.Columns.Add("Efficiency", GetType(Integer))
    dt.Columns.Add("Concision", GetType(Integer))
    dt.Columns.Add("Adherence", GetType(Integer))
    dt.Columns.Add("Total", GetType(Integer))
End If

dt.Columns(5).Expression = "Appearance + Efficiency + Concision + Adherence"

if the xml file doesn't exist and I manually setup the datatable, everything works fine, but when the datatable is filled with ReadXML, all of the fields become type String

Viewing all articles
Browse latest Browse all 27340

Trending Articles