'返回程序路径 Public Function MyAppPath() As String If Right$(App.Path, 1) = "\" Then MyAppPath = App.Path Else MyAppPath = App.Path & "\" End If End Function'打开带密码的Access Public Function ConnectString() _ As String ' ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & MyAppPath & "\data\db.mdb") & _ ";Jet OLEDB:Database Password =wumicat;Persist Security Info=False" End Function
Public Function MyAppPath() As String If Right$(App.Path, 1) = "\" Then MyAppPath = App.Path Else MyAppPath = App.Path & "\" End If End Function'打开带密码的Access Public Function ConnectString() _ As String ' ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & MyAppPath & "\data\db.mdb") & _ ";Jet OLEDB:Database Password =wumicat;Persist Security Info=False" End Function 顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!
我用vb和access做的这个程序,是通过odbc将程序和数据库连接起来的,在打包程序后安装在winxp里必须在控制面板里设置odbc,否则就不能连上数据库,对用户来说过于麻烦,请问如何修改安装程序后不用再设置odbc来连接数据库呢?能详细告诉我吗?
感谢各位热心朋友的帮助,thanks!!!
同时我也恳请你们能帮我测试一下我的这个程序,十分感谢!
我的[email protected],请告诉你们的联系方式,最好是不用邮箱,因为6M附件发送时奇慢,用msn直接发送文件或qq发送邮件比较快!
Public Function MyAppPath() As String
If Right$(App.Path, 1) = "\" Then
MyAppPath = App.Path
Else
MyAppPath = App.Path & "\"
End If
End Function'打开带密码的Access
Public Function ConnectString() _
As String
'
ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & MyAppPath & "\data\db.mdb") & _
";Jet OLEDB:Database Password =wumicat;Persist Security Info=False"
End Function
发来看看.
等我好了,再向你们请教!!
If Right$(App.Path, 1) = "\" Then
MyAppPath = App.Path
Else
MyAppPath = App.Path & "\"
End If
End Function'打开带密码的Access
Public Function ConnectString() _
As String
'
ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & MyAppPath & "\data\db.mdb") & _
";Jet OLEDB:Database Password =wumicat;Persist Security Info=False"
End Function
顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!顶!