Easysoft Blog

Wed, 03 Aug 2016

Working with ODBC Data in DBeaver

DBeaver is a database management tool and SQL client that runs on Windows, Linux, OS X and UNIX (AIX, HP-UX and Solaris) platforms.

The DBeaver SQL editor has auto completion and database-specific syntax highlighting to facilitate the creation, analysis, and debugging of complex queries.

To save its users' time, DBeaver provides SQL templates, which are snippets of commonly used SQL code. To insert the contents of a template into the SQL editor, you simply type the template's name and press the TAB key.

You can use DBeaver to save tables or query results in several formats such as CSV, SQL "Insert" statements and HTML. For example, to export your query results as web page tables, right-click on the Results view in DBeaver, select Export Resultset, and then click Export to HTML.

DBeaver can be installed either on the database server or on a remote machine. The ability to use DBeaver as a remote database manager makes it easy to administer multiple databases on multiple platforms from a single location.

Other DBeaver features include:

DBeaver is written in Java. To interact with a database, a Java application uses a JDBC driver. JDBC is a Java application programming interface (API) that connects Java to relational databases (and other tabular data, such as spreadsheets and flat files). A JDBC driver implements the JDBC API for a particular database. To access a database by using an ODBC driver, DBeaver uses a JDBC-ODBC Bridge driver to convert between ODBC and JDBC calls. For example, DBeaver can use the JDBC-ODBC Bridge that used to be included in the Java distribution. However even if you can get that combination to work (we couldn't — the connection failed either with a Java error or an ODBC Driver Manager error), there are some issues associated with the Java JDBC-ODBC Bridge. For example, it was never intended for production use and we have found that with some applications, NULLs are returned when Unicode column values are queried.

As an alternative solution, the Easysoft JDBC-ODBC Bridge is a client server product that enables a Java application such as DBeaver to access an ODBC database such as Microsoft Access. The client part of the Easysoft JDBC-ODBC Bridge is a JDBC driver. On Windows, the sever part is a Windows service that acts as an ODBC application.

The rest of this blog documents how to use the Easysoft JDBC-ODBC Bridge to access data from an ODBC database in DBeaver.

  1. Configure a System ODBC data source for the database that you want to connect to in DBeaver.

    To do this, use the 32-bit version of ODBC Data Source Administrator on your DBeaver machine. On some versions of Windows, this is located in Control Panel > Administrative Tools. On some version of Windows, you need to search for ODBC in the taskbar search box. The 32-bit version of ODBC Data Source Administrator should be clearly labelled. If in doubt, in the Windows Run dialog box, type:

    %windir%\syswow64\odbcad32.exe
  2. Download the Easysoft JDBC-ODBC Bridge. (Registration required.)
  3. Install and license the Easysoft JDBC-ODBC Bridge on the machine where the DBeaver is installed.

    For installation instructions, see the Easysoft JDBC-ODBC Bridge documentation.

  1. In DBeaver, choose Database > Driver Manager

    The Driver Manager dialog box is displayed.

  2. Choose New

    The Create new driver dialog box is displayed.

  3. Choose Add File.

    The Open driver library dialog box is displayed.

  4. Browse for the Easysoft JDBC-ODBC Bridge JAR file, EJOB.jar.

    EJOB.jar is installed in the following location on the machine where you installed the Easysoft JDBC-ODBC Bridge:

    <easysoft_install>\Jars

    On 64-bit Windows, the default location for <easysoft_install> is <drive>:\Program Files (x86)\Easysoft Limited\Easysoft JDBC-ODBC Bridge.

    On 32-bit Windows, the default location for <easysoft_install> is <drive>:\Program Files\Easysoft Limited\Easysoft JDBC-ODBC Bridge.

  5. Complete the dialog box fields:
    FieldValue
    Driver NameEasysoft JDBC-ODBC Bridge
    Drivereasysoft.sql.jobDriver
    URL Templatejdbc:easysoft://localhost/data_source:logonuser=windows_user:logonpassword=password
  6. Right-click the Database Navigator pane. From the pop-up menu, choose Create New Connection.

    The Create new connection wizard starts.

  7. Type Easysoft JDBC-ODBC Bridge in the space provided, and then choose Next.
  8. If your database requires a user name and password, enter these connection details in the spaces provided.
  9. In the wizard's final screen, name the connection and choose a connection type. Choose Finish.
  10. Right-click the new connection the Database Navigator pane. From the pop-up menu, choose SQL Editor.
  11. Type a query in the right pane. Press CTRL+ENTER to execute the query.