怎么实现将指定文档中xml格式文件读取内容并传入access database中,请写出代码
时间: 2023-03-06 15:55:34 浏览: 94
可以使用下面的代码来实现: Dim myDocument As String
Dim myDataSet As New DataSet
Dim myConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myAccessDatabase.mdb;")
Dim myCommand As New OleDb.OleDbDataAdapter("select * from myTable", myConnection)myDocument = IO.File.ReadAllText("C:\myXmlDocument.xml")
myDataSet.ReadXml(New StringReader(myDocument))
myCommand.Update(myDataSet, "myTable")
阅读全文