CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: VB & Access DB

  1. #1
    Join Date
    Nov 2001
    Location
    Toronto, Canada
    Posts
    199

    VB & Access DB

    Hi gurus... I have an Access DB which i connect, quary, insert and update using SQL from VB application. Then I was thinking about the security of the data from the database, so I set a password for the database(Access). No I am trying to connect the DB using the password and getting the following error message:
    (I try the test connection)
    ****************************************************
    Test connection failed because of an error in initializing provider. cannot start your application. the work group information file is missing or opened exclusively by another user.

    ****************************************************

    anyone have any ideas to solve this issue????

    thanks,
    kethees

  2. #2
    Join Date
    Apr 2002
    Location
    Melbourne, Victoria, Australia
    Posts
    1,792
    Did you have your Access DB opened in another window? If so, you might want to close it and try again - or uncheck the "Open exclusive" checkbox.

    Otherwise, check that your connection string looks something like this

    Code:
    Dim msAccessMDBFilePath as string
    msAccessMDBFilePath = "C:\MyAppDir\MyMDBFileName.mdb"
    cnn.connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & msAccessMDBFilePath & ";Persist Security Info=False"
    Last edited by Twodogs; November 12th, 2002 at 04:47 PM.

  3. #3
    Join Date
    Aug 2001
    Posts
    1,447
    If your db is on your local machine, I have no suggestion, but if it is on a shared drive over a network, I"ve had a situation where the network got confused about whether or not anyone had the db open and I had to get the network guys to reset some network properties before I could get back at my db.
    phinds
    vs2008, 3.5SP1 Version 9.0.21022.8 RTM

  4. #4
    Join Date
    Nov 2001
    Location
    Toronto, Canada
    Posts
    199

    opened exclusive

    I guess that because I opened exclusive (when I try to set a password). I will uncheck it and try again... then i will let you know if i still have the problem.
    by the way, I have it on my local machine, not any networking involve.

    thanks,
    kethees

  5. #5
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Lightbulb remember something from deep deep times...

    ...and if I can remember correctly, I had toi update Dao (no, not
    with Mdac, I had to search for Dao downloads in microsoft
    center).
    Cannot guarantee it will solve, but if you do not find another way, it is worth a try.
    By the way, let us know how it ends up and your solution.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  6. #6
    Join Date
    Nov 2001
    Location
    Toronto, Canada
    Posts
    199
    where do I find the a check box to "uncheck the "Open exclusive" checkbox." Please give me some directions. I tried last night but no lucks yet.

    thanks,
    kethees

  7. #7
    Join Date
    Apr 2002
    Location
    Melbourne, Victoria, Australia
    Posts
    1,792
    In the File Open dialog, the "Open" button is actually a drop down list (drop down button???) and you'll find "Open Exclusive" there. It looks like I got myself all confused between Access 97 and Access 2000 - 97 has the "open exclusive" checkbox, but 2K doesn't.

    Having another look at your problem, you might need to locate the "System.mdw" and make sure it's accessible to Access - mine is located in C:\Program Files\Common Files\System

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

Featured