Jeff Carlin
Nov 22nd, 2000, 12:20 PM
I have an app that uses an Access database thru DAO. I want to upgrade it to ADO. I use both a Username and Password for each user. This is how far I've gotten:
Dim DSN As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim strPath$, sql$
With DSN
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Jet OLEDB:System database") = Trim(PROJ_System_MDW)
.Properties("Data Source") = Trim(PROJ_DB_PATH) & PROJ_DB_Name
.Properties("Jet OLEDB:Database Password") = g_sPassword
' .Properties("Jet OLEDB:Database Username") = g_sUserName
.Open
End With
Notice the rem'd line. I cannot figure how to pass the username (this is not working). Can anyone help? If I remove the Password line as well, the database opens fine, but I've lost the security aspects. BTW, the "PROJ_" vars are pre-set.
Dim DSN As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim strPath$, sql$
With DSN
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Jet OLEDB:System database") = Trim(PROJ_System_MDW)
.Properties("Data Source") = Trim(PROJ_DB_PATH) & PROJ_DB_Name
.Properties("Jet OLEDB:Database Password") = g_sPassword
' .Properties("Jet OLEDB:Database Username") = g_sUserName
.Open
End With
Notice the rem'd line. I cannot figure how to pass the username (this is not working). Can anyone help? If I remove the Password line as well, the database opens fine, but I've lost the security aspects. BTW, the "PROJ_" vars are pre-set.