Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7970131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:21:00+00:00 2026-06-04T07:21:00+00:00

I recently updated my database from .mdb (MS Access 2003) to .accdb (MS Access

  • 0

I recently updated my database from .mdb (MS Access 2003) to .accdb (MS Access 2010).

With this update I also updated my provider from: Microsoft.Jet.OLEDB.4.0 to Microsoft.ACE.OLEDB.12.0

The connection works ok when I use a .accdb file without a password, but once I choose to

Encrypt with Password

I receive the following error when I try to open a connection.

Cannot open database ”. It may not be a database that your
application recognizes, or the file may be corrupt.

Used connection string:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\App\\Main\\bin\\Debug\\db.xxx;
Jet OLEDB:Database Password=MyPass;

Note: I use a custom extension for my .accdb file, this was used for .mdb files without problems and I assume this should not be a problem (tested).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:21:01+00:00Added an answer on June 4, 2026 at 7:21 am

    I don’t see a problem with your connection string. Still I would try it from VBA to see whether that effort sheds any light on the problem.

    This one worked from Access 2007 whether I named the db file with “accdb” or “xxx” file extension. The single quotes are not required around my password; the code succeeded whether or not I included the single quotes.

    Public Sub OleDbToEncryptedAccdb()
        'Const cstrDb As String = "encryptd.accdb" '
        Const cstrDb As String = "encryptd.xxx"
        Const cstrFolder As String = "C:\share\Access"
        Const cstrPassWord As String = "letmein"
        Dim cn As Object
        Dim strConnect As String
    
        strConnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & _
            cstrFolder & Chr(92) & cstrDb & _
            ";Jet OLEDB:Database Password='" & cstrPassWord & "';"
        Debug.Print strConnect
        Set cn = CreateObject("ADODB.Connection")
        cn.ConnectionString = strConnect
        cn.Open
        cn.Close
        Set cn = Nothing
    End Sub
    

    Edit: Apparently Access 2010 provides a stronger encryption method than earlier Access versions. With db.xxx open in Access 2010, check which ACE version is used as the Provider.

    ? CurrentProject.Connection.Provider
    

    If it replies something like Microsoft.ACE.OLEDB.14.0, use that in your c# connection string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our application uses H2Sharp to access a H2 database from C# (Framework v4). Recently
I recently updated an application from VS2003 to VS2008 and I knew I would
I recently updated jasperreport version from 3.5.2 to 4.0.2 and noticed a few changes
I've recently updated from hibernate 3.3.1.GA to hibernate 3.5.0 and I'm having a lot
Recently I inherited a database from another programmer (created / stored with SQL Management
I recently migrated a database from sql server 2005 to 2008 on windows server
I have a Access Data Project that connects to an SQL server database. Recently
We recently moved our database from our SQL Server 2005 server to our SQL
I am writing code to migrate data from our live Access database to a
My team recently rebuilt their SQL Server 2005 development database from scratch using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.