Results 1 to 8 of 8

Thread: Access2K password from VB using ADO?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091

    Access2K password from VB using ADO?

    Hi,

    I'm connecting to a password protected Access2K database from within my VB app. I'm using ADO and the connect string is as follows:

    goDb.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\something.mdb;Password=blablabla"

    However, when I run it, and it attempt to connect to the db, I get the following error:

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

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

    I'm not using the workgroup security and the database is not opened exclusively, or opened at all for that matter..

    Any idea what I'm doing wrong?

    Thanks,

    Dan

    Visual Studio 2010

  2. #2
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    Im stuck in the same situation. I have even tried a dozen methods of connecting to the database all which have produced the same error as you are receiving
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  3. #3
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    You two might want to try this:

    VB Code:
    1. 'If MDB has a database password
    2.  
    3. oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    4.            "Data Source=c:\somepath\mydb.mdb;" & _
    5.            "Jet OLEDB:Database Password=MyDbPassword", _
    6.            "myUsername", "myPassword"
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  4. #4
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    What is the difference between Database Password and MyPassword?
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  5. #5
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    VB Code:
    1. module00conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    2.                       "Data Source=" & FileName & _
    3.                       ";Jet OLEDB:Database Password=admin;", "admin", "admin"

    Here is what I have, it still produces the same error message.
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

  6. #6
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    let me turno on the other computer...on this I don't have VB

    ...
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  7. #7
    Hyperactive Member D12Bit's Avatar
    Join Date
    Oct 2000
    Location
    Guatemala
    Posts
    373
    I was getting the same error...but now...I was able to get in...
    like this:

    VB Code:
    1. module00conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    2.                       "Data Source=" & FileName & _
    3.                       ";Jet OLEDB:Database Password=admin"

    I guess that the other two is when you got the usergroup working, anyway...i couldn't make it work with a system.mdw like file...

    this should take care of your issue of accessing a passworded database...
    "Who Dares Wins" - "Quien se Arriesga Gana"
    Mail me at:

  8. #8
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    Thanks, that worked.
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width