Click to See Complete Forum and Search --> : Opening password protected mdb file
msdnexpert
Apr 28th, 2000, 01:09 PM
I am trying to open a password protected Access database using ADO 2.1. I get an error message on opening the connection object. The error is "Cannot find system workgroup information file". Any suggestions
if you create a system-dsn in control panel\odbc32 just as normal and use similar code it should work. i didn't find out how it works using a connection string, but it is propably possible too (somehow).
best regards
***********************************************************
Private Sub Form_Load()
Dim cn As New ADODB.Connection
cn.Open "Dsn=test", , "test" 'password=test
With rs
.CursorLocation = adUseClient
.Open "select * from test", cn, _
adOpenKeyset, adLockBatchOptimistic
.ActiveConnection = Nothing
End With
Set cn = Nothing
Set DataGrid1.DataSource = rs
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set rs = Nothing
End Sub
smalig
Apr 30th, 2000, 09:03 PM
And without any DSN
http://vbcity.com/vbcode/ru/click.asp?id=86
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.