locked
Connection String for the Microsoft Access 2010 with password protected RRS feed

  • Question

  • When I use a Access database version 2007 or earlier (MDB) I use the following connection string: 
    Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=c:\folder\file.mdb;Mode=Share Deny None;Persist Security Info=False;Jet OLEDB:System database='';Jet OLEDB:Database Password='xxx';
    This connection string above works with files that has a password or not. 

    Now I'm going to use Access version 2010 (ACCDB) and checking the microsoft msdn I just swapped the string:
    Provider=Microsoft.Jet.OLEDB.4.0
    By this:
    Provider=Microsoft.ACE.OLEDB.12.0

    When I do test on my local computer, the string works ok for files with or without the password. 
    However when I test in the web server only works with unprotected files (WITH NO PASSWORD) when I use a protected database, the error is shown below. 

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

    Could you help me with a connection string that will work with an Access 2010 file protected with password? 
    Thank you.
    • Moved by Amanda Zhu Monday, September 1, 2014 2:09 AM
    Monday, August 25, 2014 2:40 AM

Answers

  • Hello,

    Welcome to MSDN forum.

    Your issue is out of support range of VS General Question forum which mainly discusses the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System and Visual Studio Editor.

    Because your issue is on Access connection in ASP.NET Web Application, I suggest that you can consult your issue on Access Databases and AccessDataSource Control forum: http://forums.asp.net/55.aspx/1?Access+Databases+and+AccessDataSource+Control for better solution and support.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Amanda Zhu Wednesday, August 27, 2014 8:11 AM
    • Marked as answer by Just Karl Thursday, September 4, 2014 10:06 PM
    Tuesday, August 26, 2014 2:52 AM