将ACCESS数据库放在程序所在目录下,代码中用ADO对象连接 dim conn as new adodb.connection With conn if .state<>adstateclosed then .close .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\test.mdb" .Open .CommandTimeout = 300 End With
dim conn as new adodb.connection
With conn
if .state<>adstateclosed then .close
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\test.mdb"
.Open
.CommandTimeout = 300
End With