Easysoft Blog

Thu, 19 Apr 2018

IntelliJ IDEA

JetBrains IntelliJ IDEA is a Java integrated development environment (IDE).

IntelliJ supports JDBC, enabling it to develop applications that use data from databases for which a JDBC driver is available. The Easysoft JDBC-ODBC Bridge extends the number of databases that are available to IntelliJ by bridging between JDBC and ODBC. You can then also work with data from backends for which an ODBC driver is available. For example, you can connect IntelliJ to Microsoft Access by using the Easysoft JDBC-ODBC Bridge and the ODBC Driver for Microsoft Access:

Note Currently, the Easysoft JDBC-ODBC Bridge supports 32-bit ODBC drivers only. On Windows, all recent Easysoft ODBC drivers install both a 32-bit and a 64-bit ODBC driver.

These steps show how to work with ODBC data in IntelliJ on Windows:

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

    To do this, use the 32-bit version of ODBC Data Source Administrator on your IntelliJ 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 you created the data source.

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

  4. In IntelliJ, choose View > Tool Windows > Database.

    The Database tool window is displayed.

  5. Choose Spanner icon.

    The Data Sources and Drivers dialog box is displayed.

  6. Choose the + button and select Driver and Data Source.
  7. Choose Database Driver.
  8. In the Driver files section, choose the + button and browse to and select the Easysoft JDBC-ODBC Bridge JAR file, EJOB.jar.
  9. 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.

    If necessary, copy EJOB.jar to the machine where you have installed IntelliJ.

  10. Complete the Settings page:
    Setting Value
    Name Easysoft
    Class easysoft.sql.jobDriver
  11. Choose the Advanced tab.
  12. Change the values for the fields in this page:
    Setting Value
    logonuser my_windows_user
    logonpassword my_windows_password
  13. Choose OK.
  14. In the Database section, right-click the Easysoft driver. Choose Properties.
  15. Complete the General page:
    Setting Value
    Name Easysoft
    URL jdbc:easysoft://my_job_machine/my_odbc_data_source
  16. Choose the Advanced tab.
  17. Change the values for the fields in this page:
    Setting Value
    logonuser my_windows_user
    logonpassword my_windows_password
  18. Choose OK.
  19. In the Database section, right-click the Easysoft driver. Choose SQL Script.
  20. Execute a SQL query against the new database connection. For example:
    select * from suppliers