OleDbConnection

I've a password protected Access db on a remote box.  Using MSAccess to open the DB manually through a UNC works just fine.  However,

OleDbConnection DBConn=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;"
                                          +"Data Source="+DBFullUNC+";"
                                          +"pwd=shhh");
DBConn.Open();

results in "Could not find installable ISAM"

Is this complaining about the box the code is running on or the remote box where the mdb is?  Is there some other provider I could use or a connection string parameter I need to add?
LVL 22
cookreAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cookreAuthor Commented:
I do note that if I remove the password from the mdb, everything works fine.
0
bibendum95Commented:
I've connected to secured MDBs, but never any password protected MDBs -- so I may be mistaken, but I thought the database password property was called 'Database Password'. Does it make a difference if you change the last line to read:
       +"Jet OLEDB:Database Password=shhh");
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cookreAuthor Commented:
Alas, no joy.
'Database Password=shhh;' gives the same result.
Installing the latest MDAC and .NET SP2 had no effect either.


0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

dottheiCommented:
see
http://www.mvps.org/access/bugs/bugs0017.htm 

Bugs: Couldn't Find Installable ISAM
 Author(s)
Dev Ashish
 
 
  When you try to export/import data from Excel, dBase, Text or some other file type, you might get this error message.  
     A missing file or corrupt registry entry are the usual causes behind this error.  Sometimes, a typical Office Setup does not install these drivers by default.  Re-run the Setup program, and manually select the individual drivers under the Data Access options.  If any of the driver files were missing, they should be copied and registered by the Setup program.

    However, in a few cases, this does not get rid of the error message.   If the driver files are already present on the hard drive,  the registry entries could be corrupt.  

    First try registering the appropriate dll with RegSvr32 (sample steps). If this doesn't work, then try running the setup with some command line arguments:

    Setup /y /r

     If you still experience the same error message, try completely uninstalling Access. Then, search for these files on your hard drive, and rename them.

Msexcl35.dll (Excel) Mstext35.dll (Text)
Msxbse35.dll (dBase) Msxbse35.dll (FoxPro)

Now, re-install Access.
 
 
0
cookreAuthor Commented:
You'll also find references to a third variant:

"Can't find installable ISAM"

Each of these deal with the inability to access non-MDB databases by a number of different packages for various causes, none of which, unfortunately, apply here (would that they did).

I get the same result with Access 2000 and 2002 under each of NT, 2K, and XP - and all tests were run on different, non-pristine boxes:

An MDB with no password works fine in all cases (with and without indices), but as soon as a password is added, the .NET code fails (although Access itself has no problem (golly, I wonder why))

0
GUEENCommented:
and this: specify a database password, not
a user password.  The working code reads:

OleDbConnection perConnection =
    new OleDbConnection ( "Provider=Microsoft.Jet.OLEDB.4.0"
                         +";Data Source=" + Server.MapPath
("db\\Data.mdb")
                         +";Jet OLEDB:Database Password=XxxxxYyyyy"
                       
0
cookreAuthor Commented:
After Ms. Shek's response, I realized I had mis-read your post.  Switching from "pwd=xxx" to "Jet OLEDB..." made it all work.


And for She Who Whacked Me Up Side The Head And Made Me Open My Eyes:
http://www.experts-exchange.com/Databases/MS_Access/Q_20567160.html

Thanks to all, and to all a good night.

0
GUEENCommented:
I can't take them point scookie - heart!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.