I'm struggling to get Squirrel SQL to connect to MS Access database (just a normal one, no password):
I guest this should be a simple straight forward process, but please advise me how to get it working.
Connect to SQL Server data and execute queries in the Squirrel SQL Client. The CData JDBC Driver for SQL Server enables you to execute queries to SQL Server data in tools like Squirrel SQL Client. In this article, you will create a JDBC data source for SQL Server data and execute queries.
The SQuirreL SQL Client is a database administration tool. It uses JDBC to allow users to explore and interact with databases via a JDBC driver. It provides an editor that offers code completion and syntax highlighting for standard SQL.
Adding a driver entry in SQuirreL SQLOpen SQuirreL SQL and select the “Drivers” tab on the left side of the window. Click the “+” icon to create a new driver entry. In the “Add Driver” dialog box, select the “Extra Class Path” tab, and click “Add” to add a new entry for the the Caché JDBC driver JAR file.
Now that the JDBC-ODBC Bridge has been removed from Java 8 the previous answer to this question will become less relevant over time. The following method uses the UCanAccess JDBC driver so it will work with Java 8 and it will also work on non-Windows platforms.
First, make sure that you are using UCanAccess version 3.0.5 or later. Download the latest version of the UCanAccess driver (bin.zip
file) and unzip it to a convenient location. For this example I unzipped it to
/home/gord/Downloads/JDBC/UCanAccess
Note: When unzipping the distribution file be sure to specify "Keep directory structure" (or similar, depending on your unzip tool) so the folder structure appears as in the screenshot above.
In Squirrel SQL, create a new "Driver" entry for UCanAccess
and specify the location of loader/ucanload.jar on the "Extra Class Path" pane
Note: Remember to enter net.ucanaccess.jdbc.UcanloadDriver
as the "Class Name" (see above).
To open a specific database, create a Squirrel SQL "Alias" entry, replacing the <path_to_database_file>
placeholder with the actual path to the file
or, in Windows
Important: Make sure that the connection URL ends with ;showSchema=true
.
I found the solution. Put below string in URL:
(Assuming that path to your database file is D:\DBs\DatabaseFile.mdb)
jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=D:\DBs\DatabaseFile.mdb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With