更新时间:2022-04-02 04:49:39
首先从xml制作数据表,如下所示:
Hi,
First make datatable from xml like this:
DataTable table;
private void createDatatableFromXML()
{
table = new DataTable();
string dataFile = @"DatafileLocation\datafile.xml";
if (File.Exists(dataFile))
{
table.ReadXml(dataFile);
}
else
{
//Do som messaging
return;
}
}
如果你想从dataTable创建一个sql数据库,请看这个: http: //***.com/questions/1348712/creating-a-sql-server-table-from-ac-sharp-datatable [ ^ ]
希望这可以帮助你,
Groover
If You want to create a sql database from the dataTable see this:http://***.com/questions/1348712/creating-a-sql-server-table-from-a-c-sharp-datatable[^]
Hope this can help You,
Groover