1、为什么要这样做?
2、执行代码可以导入到foxtable
Dim dlg As new OpenFileDialog
If dlg.ShowDialog = DialogResult.OK Then
If Connections.Contains("test") Then Connections.Delete("test")
Connections.Add("test","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dlg.FileName & ";Persist Security Info=False")
For Each tn As String In Connections("test").GetTableNames
Dim ip As New Importer
ip.SourcePath = dlg.FileName '指定数据文件
ip.SourceTableName = tn '指定要导入的表
ip.NewTableName =tn '导入后的表名
ip.Import()
Next
End If