Run-time error 2147217843 (80040e4d) connecting to external database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vspargo
    New Member
    • Apr 2007
    • 2

    Run-time error 2147217843 (80040e4d) connecting to external database

    I'm trying to add a field to a secured external database using VBA (it's the back end of the one the code is running in). Both databases are Access 2002 OS=Windows XP.

    The error tells me I'm using an incorrect Account Name or Password, but they are correct.

    Code:
    cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &_
    "Data Source=c:\...\Data.mdb;Jet OLEDB:System Database="&_
    "c:\...\Secured.mdw;UserID=Me;Password=abc;"
    The rest of my code works if I use it on an unsecured database, it's just the security connection that I'm having trouble with.

    Before I added the System Database reference I was getting the same error number telling me the Workgroup file was in use or missing.

    Please help!
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Try this ...

    Code:
    cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &_
    "Data Source=c:\...\Data.mdb;Jet OLEDB:System Database="&_
    "c:\...\Secured.mdw;Password=abc"
    I've dropped the semi-colon at the end of the statement and removed the UserID reference.

    Mary

    Comment

    Working...