'************************** '获得应用程序所在路径 '************************** Public Function GetAppPath() Dim Path As String Path = App.Path If Right(Path, 1) = "\" Then GetAppPath = Path Else GetAppPath = Path + "\" End If End Function
直接这样写 con.provider="microsoft.jet.oledb.4.0" if right(app.path,1)<>"\" then app.path=app.path & "\" end if con.open app.path & "record.mdb"
改为:
& app.path & "\Record.mdb"
你的路径错误啊。
就是App.Path+"\" 或App.Path
provider改为microsoft.jet.oledb.4.0
'获得应用程序所在路径
'**************************
Public Function GetAppPath()
Dim Path As String
Path = App.Path
If Right(Path, 1) = "\" Then
GetAppPath = Path
Else
GetAppPath = Path + "\"
End If
End Function
con.provider="microsoft.jet.oledb.4.0"
if right(app.path,1)<>"\" then
app.path=app.path & "\"
end if
con.open app.path & "record.mdb"
";database=" & strDBName & ";UID=" & strUID & ";PWD=" & strPassWord '& ";DistribTx=1"