I've written some VBA code in an Excel workbook to retrieve data from an Access database in the same directory on a desktop. It works fine on my machine and several other machines running Windows XP, but when we tested this on a Vista machine, we encountered the following error:
Could not find installable ISAM
I've done a bunch of searching online but can't seem to find a concrete answer. The connection string seems to be fine, and, as I mentioned, it works on several machines.
Does anyone have any idea what could be causing this? My connection string is as follows:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\ptdb\Program Tracking Database.mdb;
Thanks
8 Answers
Place single quotes around the Extended Properties
:
OleDbConnection oconn = new OleDbConnection( @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1;';");
Try it, it really works.
2Try putting single quotes around the data source:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source='D:\ptdb\Program Tracking Database.mdb';
The problem tends to be white space which does have meaning to the parser.
If you had other attributes (e.g., Extended Properties), their values may also have to be enclosed in single quotes:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source='D:\ptdb\Program Tracking Database.mdb'; Extended Properties='Excel 8.0;HDR=YES;IMEX=1;';
You could equally well use double quotes; however, you'll probably have to escape them, and I find that more of a Pain In The Algorithm than using singles.
7Just use Jet OLEDB: in your connection string. it solved for me.
an example is below:
"Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=E:\Database.mdb;Jet OLEDB:Database Password=b10w"
I have just encountered a very similar problem.
Like you, my connection string appeared correct--and indeed, exactly the same connection string was working in other scenarios.
The problem turned out to be a lack of resources. 19 times out of 20, I would see the "Could not find installable ISAM," but once or twice (without any code changes at all), it would yield "Out of memory" instead.
Rebooting the machine "solved" the problem (for now...?). This happened using Jet version 4.0.9505.0 on Windows XP.
I used this to update a excel 12 xlsx file
System.Data.OleDb.OleDbConnection MyConnection; System.Data.OleDb.OleDbCommand myCommand = new System.Data.OleDb.OleDbCommand(); MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0;Data Source='D:\\Programming\\Spreadsheet-Current.xlsx';Extended Properties='Excel 12.0;HDR=YES;';"); MyConnection.Open(); myCommand.Connection = MyConnection; string sql = "Update [ArticlesV2$] set [ID]='Test' where [ActualPageId]=114";// myCommand.CommandText = sql; myCommand.ExecuteNonQuery(); MyConnection.Close();
Use this connection string
string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + strFileName + ";" + "Extended Properties=" + "\"" + "Excel 12.0;HDR=YES;" + "\"";
1This problem is because the machine can't find the the correct ISAM (indexed sequential driver method) registered that Access needs.
It's probably because the machine doesn't have MSACeesss installed? I would make sure you have the latest version of Jet, and if it still doesn't work, find the file Msrd3x40.dll from one of the other machines, copy it somewhere to the Vista machine and call regsvr32 on it (in Admin mode) that should sort it out for you.
1Use the connection string below to read from an XLSX file:
string ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + <> + ";Extended Properties=Excel 8.0;";
ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobGpqYWmAcLHRq6arZZOkwq2wjKemrWWWnrulecinqq2ZnKGuo7jEZqCsmZ0%3D