2010-05-29 81 views
1

我正在嘗試幫助用戶從VB6應用程序遷移到C#應用程序。 的VB6應用程序允許數據導出從經由XML一個ADO(2.8)記錄,但C#應用程序無法讀取XML產生以下錯誤:從ADO(VB6)讀取XML文件導入.Net數據集

System.Data.DuplicateNameException:命名爲「名稱」的列已經屬於這個數據表

VB6代碼

Dim RS As Recordset 
    Set RS = p_CN.Execute("SELECT * FROM tblSuppliers INNER JOIN tblSupplierGroups ON tblSupplierGroups.SupplierGroupID=tblSuppliers.SupplierGroupID") 
    RS.Save sDestinationFile, adPersistXML 
    Set RS = Nothing 

C#代碼

 DataSet ds = new DataSet(); 
     ds.ReadXml(xmlFilePath); 

我明顯錯誤地認爲XML文件格式是普遍理解的嗎?

回答