2009/07/09

access2007:パスワードロックしたaccdbへのアクセス

Dim cn As New ADODB.Connection
Dim cnStr As String, dbDir As String, Pswd As String

    dbDir = "\\hogehoge\database\hogeDB.accdb"
    Pswd = "Passw0rd"
    cnStr = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
            "Data Source=" & dbDir & ";" & _
            "Jet OLEDB:Database Password=" & Pswd & ";"
    cn.Open cnStr
http://www.connectionstrings.com/
ここは有益だ

0 件のコメント: