04-10-2017 09:01 AM - edited 04-10-2017 09:02 AM
Another database error on open. I have an mdb file that I suspect is made from an old version of Microsoft Access, but am unsure the version. I have Access 2013 installed and when I try to open it I get an error:
"Cannot open a database created with a previous version of your application."
But despite Access not being able to open it I was hoping LabVIEW could since I can specify with the connection string how to open it. Even so trying to get Access to open it is a pain since I don't seem to have any conversion tools available, and everything online doesn't appear to help.
But back to LabVIEW a bit, I try to open it with a few connection strings:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=%s;Jet OLEDB:Database Password=%s;
Results in: "Exception occured in Microsoft Access Database Engine: Cannot open a database created with a previous version of your application."
Provider=Microsoft.ACE.OLEDB.12.0;Persist Security Info=False;Data Source=%s;Database Password=%s;
Results in: "Exception occured in Microsoft Access Database Engine: Could not find installable ISAM."
But honestly these connection strings are still a mystery to me. Any help or suggestions in how to open this database without an error is appreciated.
Windows 7 x64, LabVIEW 2015 SP1 32-bit, Office 32-bit.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
Solved! Go to Solution.
04-10-2017 09:39 AM - edited 04-10-2017 09:42 AM
If it was made by an older version of access, then maybe you need to use a jet driver for that.
Look for a connection string here:
https://www.connectionstrings.com/microsoft-jet-ole-db-4-0/
The problem you have right now, is that you are using the same driver as Access is using.
Access is "just" a front end GUI for jet databases.
Or maybe a ODBC driver for Access
https://www.connectionstrings.com/microsoft-access-odbc-driver/
04-10-2017 10:27 AM
Couple things to remember when using connection strings:
For 64 bit machines, when setting up a DSN, you should use the ODBC tool in the following location:
C:\Windows\SysWOW64\odbcad32.exe
I think the default shortcut in the start menu points to a different EXE and doesn't work properly. Try the above exe and see if it works. Your error is specific to the version of Access so this probably won't make a difference but it is certainly something to keep in mind if you are having issues.
An easy way to create connection strings is to create a txt file on your desktop and rename it with a UDL extension. Double click the file and configure your connection using the correct ODBC driver. After you get a successful tested connection, open the UDL file in a text editor and it will give you a connection string.
04-10-2017 10:31 AM
With the provided connection string (adding password) I have this:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;Extended Properties=Paradox 5.x;Database Password=%s
And the response is still error: "Exception occured in Microsoft JET Database Engine: Could not find installable ISAM."
Still very useful site. And very useful suggestion of the connection string as a text file. That being said I was able to track down an older PC with Access 2010 and convert the database made in Access 97 to something newer that the previously non-working connection string works with.
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=%s;Jet OLEDB:Database Password=%s;
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-10-2017 12:03 PM
Have you checked that the jet engine is installed?
Also for the Access 97 db, the string should be something like:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;
Jet OLEDB:Database Password=MyDbPassword;"
In the ODBC tool you should be able to see what is installed for database providers.
04-10-2017 12:06 PM
That did it thank you.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord