0

I'm trying to open access database from my .net application, C#, but I'm still getting this error:
System.Data.OleDb.OleDbException(0x80040E4D): Cannot start your application. ... the file is missing or corrupt.

When I open database and run application at the same time. I get error:
the file is opened by another user.

here's my connection string, in general form:

OleDbConnection con;
con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=path_to_database\database.accdb;Jet OLEDB:Database;Password=admin;");
con.open();      // error(exception) here

Thanks

0

1 Answer 1

1

You have a spurious semicolon in your connection string:

;Jet OLEDB:Database;Password=admin;

should be

;Jet OLEDB:Database Password=admin;
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks but that's not it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.