I am trying to set the Connection String of ADODC control. But i am not able to Create a Successfull Test Connection. I am getting an Error. "Test connection failed because of an error in initializing provider. Cannot start your application. The work group file is missing or opened exclusively by another user". I am using Access 2007 and I have password to my Database.
2 Answers
You probably have no sufficient file system rights to open *.mdw file and/or create *.ldb file on the fly. Best is to grant r/w access to *.mdb and *.mdw files AND file create/update/delete right to containing folder.
Note that you either have to use system.mdw file from some windows folder or custom *.mdw file in same folder as *.mdb files reside. The latest approach is recommended; sure you need to set connection properties accordingly.
4 Comments
It sounds like that the Access database you're trying to use is already open somewhere else. Verify that the Access database is closed before trying to open it in the Server Explorer. Additionally, make sure that it is closed in the Server Explorer before trying to use it within your application.
Try this syntax to connect Access 2007:
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<your db path>;Jet OLEDB:Database Password=<password>;"
For more details see Connection strings for Access 2007