换一种思路,mark 导出access
Dim t As Table = CurrentTable
Dim str_oleConn As String = Connections("test").ConnectionString
Dim ole_conn As New System.Data.OleDb.OleDbConnection(str_oleConn)
Try
ole_conn.Open()
Dim str As String = ""
For Each c As Col In CurrentTable.cols
str &= c.name & " char(16),"
Next
output.show(str)
Dim cmd1 As New System.Data.OleDb.OleDbCommand("Create Table " & t.name & " (" & str.Trim(",") & ")", ole_conn)
cmd1.ExecuteNonQuery()
For Each r As Row In t.rows
str = ""
For Each c As Col In t.cols
str &= "'" & r(c.name) & "',"
Next
Dim cmd2 As New System.Data.OleDb.OleDbCommand("Insert Into " & t.name & " values (" & str.Trim(",") & ")", ole_conn)
output.show(str)
cmd2.ExecuteNonQuery()
Next
msgbox("保存成功")
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
ole_conn.Close()
End Try