PRB: "Cannot Start Your Application" Error When You Open a Database Project That Has an Access Data Connection

Article translations Article translations
Article ID: 823913 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

You connect to a password-protected Microsoft Access database by using the Microsoft Jet 4.0 OLE DB Provider from a Microsoft Visual Studio .NET Database project, and then you remove the data connection and close the Database project. When you reopen the Database project, the data connection is not opened, and you receive the following error:
Unable to connect to database.
Cannot start your application. The workgroup information file is missing or opened exclusively by another user.

Note The Microsoft Development Environment dialog box also appears and displays the following message:
Unable to connect to a Database specified in the Solution.
Do you want to modify this Database connection properties?

CAUSE

To open a connection to a password-protected Access database by using the Microsoft Jet 4.0 OLE DB Provider, you must provide a value to the Jet OLEDB:Database Password property. However, you cannot type a database password in the Please Enter MS JET OLE DB Initialization Information dialog box. Therefore, you receive an error when you try to open the connection to the password-protected Access database from the Database project.

WORKAROUND

To work around the problem that is described in the "More Information" section of this article, provide the database password in the Data Link Properties dialog box. To do this, follow these steps:
  1. In the Solution Explorer, expand Database References.
  2. Double-click the reference to the Access database. In the Please Enter MS JET OLE DB Initialization Information dialog box, click Cancel.
  3. In the Server Explorer message box, click OK.
  4. In the Microsoft Development Environment dialog box, click Yes.
  5. In the Data Link Properties dialog box, click the All tab.
  6. Click Jet OLEDB:Database Password in the properties list, and then click Edit Value.
  7. In the Edit Property Value dialog box, type testpwd in the Property Value box, and then click OK.
  8. In the Data Link Properties dialog box, click OK.
-or-

To work around the problem, provide user level security for the Access database. When you provide user level security to the database, the data connection is opened.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

Set the Access Database Password

  1. Start Microsoft Access.
  2. On the File menu, click Open.
  3. In the Open dialog box, locate the Northwind.mdb file by using the following path: %Program Files%\Microsoft Office\Office10\Samples
  4. Select the Northwind.mdb file, and then click Open Exclusive in the Open list.

    Note You must open the Northwind.mdb file in the Open Exclusive mode to set the password to the Access database.
  5. On the Tools menu, point to Security, and then click Set Database Password.
  6. In the Set Database Password dialog box, type testpwd in the Password and the Verify boxes, and then click OK.
  7. Close the Northwind database file.
  8. Quit Access.
Create a Database Project in Microsoft Visual Studio .NET
  1. Start Visual Studio .NET.
  2. On the File menu, point to New, and then click Project.
  3. Under Project Types, expand Other Projects, select Database Projects, and then click OK.
  4. In the Data Link Properties dialog box, click the Provider tab.
  5. In the OLE DB Provider(s) list, select Microsoft Jet 4.0 OLE DB Provider, and then click Next.
  6. On the Connection tab, click the ellipses (...) button.
  7. In the Select Access Database dialog box, locate the Northwind.mdb file by using the following path: %Program Files%\Microsoft Office\Office10\Samples
  8. Select the Northwind.mdb file, and then click Open.
  9. In the Data Link Properties dialog box, click the All tab.
  10. Select the Jet OLEDB:Database Password property in the properties list, and then click Edit Value.
  11. In the Edit Property Value dialog box, type testpwd in the Property Value box, and then click OK.
  12. In the Data Link Properties dialog box, click OK.
  13. On the File menu, click Save All.
  14. In the Server Explorer, right-click your Access data connection, and then click Delete.
  15. In the Server Explorer dialog box, click Yes.
  16. Quit Visual Studio .NET.
  17. Start Visual Studio .NET.
  18. On the File menu, point to Recent Projects, and then click your project.
  19. In the Please Enter MS JET OLE DB Initialization Information dialog box, type testpwd in the Password box, and then click OK.
  20. You notice the error that is mentioned in the "Symptoms" section of this article.

REFERENCES

For more information, visit the following Microsoft Developers Network (MSDN) Web sites:
http://msdn2.microsoft.com/en-us/library/5ybdbtte(vs.71).aspx

http://msdn2.microsoft.com/en-us/library/aa158482(office.10).aspx

Properties

Article ID: 823913 - Last Review: May 16, 2007 - Revision: 2.3
APPLIES TO
  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Professional Edition
  • Microsoft Visual Studio .NET 2003 Academic Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft Visual Studio .NET 2002 Academic Edition
Keywords: 
kbjet kbsecurity kbdatabase kbprb KB823913

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com