Querying Password protetected Access DB with ADO

  • Thread starter Thread starter Corbin
  • Start date Start date
C

Corbin

Thanks in advance for your help.

I am trying to query a password protected Access DB using ADO.
believe I have the password in the syntax but I'm not sure so this ma
be causing the problem (this is the first time I've coded the passwor
into VB). But the error I am getting is this:

Run-time error '-2147217843(80040e4d)':

Cannot start your application. The workgroup information file i
missing or opened exclusively by another user.


This error occurs right as it is trying to open the path. Am I missin
something obvious? Is this file protected in some other way or have
just coded this wrong? I'm not real comfortable with ADO yet (or VB i
general for that matter) so please be kind.

Here is my code:

'Set DatabasePath
DatabasePath = "C:\DatabaseFolder\Database.mdb"

'Create the connection to the Warranty Database
Set conn = New ADODB.Connection
With conn
.Provider = "Microsoft.JET.OLEDB.4.0"
.Open DatabasePath, Password:="myPassword"
End With



any ideas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top