Results 1 to 12 of 12

Thread: Bogus Error Trying to Connect to Database

  1. #1

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Bogus Error Trying to Connect to Database

    My VB program connects to an Access database that is located on a network drive.

    This connection has worked seamlessly for months, and all of a sudden today it has derailed. I think it has something to do with the fact that I recently installed an old VB program on my computer. This recently installed program has nothing to do with the program I wrote, they are two entirely different things. Having said that though, I'd say the MDAC or something got all screwed up when I installed this older software earlier in the week.

    Anyways, here's the problem.

    I get an error in VB saying "Provider cannot be found. It may not be properly installed". This error occurs on the following line:

    VB Code:
    1. PhysDat.Open "Provide=MSDASQL.1;Persist Security Info=False;Data Source = PhysDat"

    My first reaction was to "Google" this error. The only real solution I found was to change the provider to JET 4.0, which I tried, but to no ovail.

    So I re-installed MDAC - Still not working.

    To see exactly what was going on I created a Data Environment in my VB Project and tried to use the Connection Wizard to connect to the database.

    This wizard works great when I try to connect to files on my local machine, but as soon as I try to connect to the file on the network drive, I get this...


    "Microsoft Data Link Error - Test Connection failed because of an error initializing provider. Cannot start your application. The workgroup information file is missing or opened exclusively by another user."


    Oh, and also....this error occurs when I try to access any of the 5 Access databases on the network drive, so it's not just the one I'm trying to access with my program.

    Any ideas?

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Bogus Error Trying to Connect to Database

    Have you tried re-installing your previous working program?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Bogus Error Trying to Connect to Database

    It's not an executable. I get this error in VB while developing.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Bogus Error Trying to Connect to Database

    Have you tried reinstalling VB?

  5. #5
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Bogus Error Trying to Connect to Database

    1) if u are accessing Access u are using the wrong connection string..
    VB Code:
    1. PhysDat.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=[B]C:\mydatabase.mdb[/B];Uid=;Pwd=;"
    2) Get the UNC path to the Access Database and put in in place of the bold portion of the Conn string...
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  6. #6

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Bogus Error Trying to Connect to Database

    I don't think that's it and here's why.

    1) It worked perfectly until recently.
    2) When I add the data environment I can't even connect to this file using the connection wizard.

    Also, I tried something else.

    I created a brand new VB Project and tried to add a connection in the data environment to the file. Still...no dice.

    I'm wondering if I inadvertantly set one of the users up with "Exclusive Access" in the ODBC connection.....that may explain it...what do you guys think? Then again though, other users should be having the same issue.
    Last edited by The_Grudge; Apr 28th, 2006 at 01:34 PM.

  7. #7
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Bogus Error Trying to Connect to Database

    Look for a file called System.mdw (the Access work-group file) on your hard-drive. Basically, it is a crappy security measure that is used to give people permissions to the database. I don't know the ins and outs of the mdw file, never used them. I just know they cause problems.

    Was one installed by the old application?

  8. #8

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Bogus Error Trying to Connect to Database

    Hey Bruce,

    There is one on my C drive (local machine) but not one on the network drive where the Access file resides. Perhaps this is normal though?

    Anyways, it's called "System.MDW" as you state, and it is 108kb and is stored in "C:\Program Files\Common Files\System"

    Should I erase it, edit it?

  9. #9

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Bogus Error Trying to Connect to Database

    UPDATE

    I just went into the ODBC connection for this database and clicked on "REPAIR".

    I got an error message saying that the file was opened exclusivley by another machine.

    So let's say that IS the issue. Howcome I can still open Access directly with no issues. I thought once a file is opened exclusively, it won't work no matter how you access it.

  10. #10

    Thread Starter
    Fanatic Member The_Grudge's Avatar
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    836

    Re: Bogus Error Trying to Connect to Database

    BUMP.

  11. #11
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Bogus Error Trying to Connect to Database

    Have you tried using the Jet provider instead?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  12. #12
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: Bogus Error Trying to Connect to Database

    i dont know if this will help but i got this link when i googled

    http://www.winsoft.sk/daofaq.htm#Q23

    hope that helps
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

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