+1  A: 

You aren't escaping the file path.

You should use an OleDbConnectionStringBuilder, which will correctly escape paths with special characters, and will probably solve your problem.

For example:

OleDbConnectionStringBuilder builder = new OleDbConnectionStringBuilder();
builder.Provider = "Microsoft.Jet.OLEDB.4.0";
builder.DataSource = strFile;
builder["User Id"] = "admin";
SLaks
I just tried it, it doesn't work, same error. thanks
DarkJaff
A: 

It might pay to add this check to the start of your method, just to make it easier to tell when this method is not being called properly. Not sure whether this is the issue you are having, but it might rule out one possible bug.

        if (string.IsNullOrEmpty(strFile))
        {
            throw new ArgumentNullException("strFile", "strFile must be set");
        }
Daniel Dyson
I just tried it, same error. Thanks!
DarkJaff
A: 

Maybe you are lacking Initial Catalog, that is, DataBase you want to connect to.

Initial Catalog=YourDBName

Daniel Dolz
I checked on connectionstrings.com and there is no need for Initial Catalog on an access database since there is only one database in the file. Thanks anyway :)
DarkJaff
A: 

Ok, here is what happened.

The database missed 2 column in one table. The reason? Well, in the application, when the user click on "New", a copy is made of the .mdb in the application folder to the location of the choice of the user. The "model" database is ok, all the column are there, but the copied file was missing 2 column. So I did a little research, a found that the application was using the Virtual Store of Windows 7 instead of the program file directory. Why? We think that the user saved the file right in the program file directory (something that cause a copy in the virtual store) with the old version of the app (and of the database). At this moment, the virtual store was used in priority to the program file and everything was not working.

So thanks for all your help, it help me find the problem!

DarkJaff