JAVA JDBC-ODBC Bridge Connector

In this article you will learn how to integrate JDBC-ODBC Bridge data to JAVA (live / bi-directional connection to JDBC-ODBC Bridge). JDBC-ODBC Bridge driver can be used to consume data from any JDBC Driver in non JAVA apps (i.e. Excel, Power BI, C#). Many apps written in C++ or .net (e.g. Excel, Power BI, Informatica) which don’t have direct support for using JAVA based JDBC driver technology..

Using JDBC-ODBC Bridge Connector you will be able to connect, read, and write data from within JAVA. Follow the steps below to see how we would accomplish that.

Download  Help File  Buy 

Create Data Source in ZappySys Data Gateway based on ZappySys JDBC Bridge Driver

  1. Download and install ZappySys ODBC PowerPack.

  2. Search for gateway in start menu and Open ZappySys Data Gateway:
    Open ZappySys Data Gateway

  3. Go to Users Tab to add our first Gateway user. Click Add; we will give it a name tdsuser and enter password you like to give. Check Admin option and click OK to save. We will use these details later when we create linked server:
    ZappySys Data Gateway - Add User

  4. Now we are ready to add a data source. Click Add, give data source a name (Copy this name somewhere, we will need it later) and then select Native - ZappySys JDBC Bridge Driver. Finally, click OK. And it will create the Data Set for it and open the ZS driver UI.

    ZappySys Data Gateway - Add JDBC Data Source

  5. Now, we need JDBC Bridge Connection. Lets create it. When you see DSN Config Editor with zappysys logo first thing you need to do is change default DSN Name at the top and Configure JDBC Bridge Driver. Enter Credentials (In this Example We have used PostgreSQL Credentials) and then Click on Test Connection to verify your credentials.

    Note: Enter suitable JDBC Driver Credentials, You can read data from any JDBC Driver
    ODBC JDBC Bridge Driver - Create Connection

  6. This example shows how to write simple SOQL query (JDBC Bridge Object Query Language). It uses WHERE clause. For more SOQL Queries click here.
    SOQL is similar to database SQL query language but much simpler and many features you use in database query may not be supported in SOQL (Such as JOIN clause not supported). But you can use following Queries for Insert, Update, Delete and Upsert(Update or Insert record if not found).

    SELECT orderid, customerid, orderdate, orderamount FROM "public"."zappysys"
    ZappySys ODBC Driver - Select Table and Preview Data
  7. Click OK to finish creating the data source

Read data in Java from the DSN

  1. Java code to get the data:

    "jdbc:sqlserver://localhost:5000;databasename=JdbC-OdbcBridgeDSN;user=tdsuser;password=test"
    Java code to Make ZappySys Driver Data Source Call

  2. When you run the code it will make the API call and read the data:
    Java code ZappySys Driver Data Source Results

  3. Here is Java program's code in text format:

    
    //Step-1: Install ZappySys ODBC PowerPack and Configure Data Gateway
    
    //Step-2:Assuming the Microsoft SQL Server JDBC Driver is in below folder
    //C:\Program Files\Microsoft Jdbc Driver 6.0 for SQL Server\sqljdbc_6.0\enu\auth\x64
    package padaone;
    
    import java.sql.*;
    
    public class zappy {
    
        public static void main(String[] args) {
    
            // Create a variable for the connection string.
            String connectionUrl = "jdbc:sqlserver://localhost:5000;databasename=JdbC-OdbcBridgeDSN;user=test;password=test";
    
            // Declare the JDBC objects.
            Connection con = null;
            Statement stmt = null;
            ResultSet rs = null;
    
                try {
                    // Establish the connection.
                    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
                    con = DriverManager.getConnection(connectionUrl);
    
                    // Create and execute an SQL statement that returns some data.
                    String SQL = "SELECT Country , SUM(UnitPrice * Quantity) Total " 
                               + "FROM value " 
                               + "GROUP BY Country "
                               + "WITH (SRC='https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')";
                    stmt = con.createStatement();
                    rs = stmt.executeQuery(SQL);
    
                    // Iterate through the data in the result set and display it.
                    while (rs.next()) {
                        System.out.println(rs.getString(1) + " " + rs.getString(2));
                    }
                }
    
            // Handle any errors that may have occurred.
            catch (Exception e) {
                e.printStackTrace();
            } 
            
            finally {
                if (rs != null) try { rs.close(); } catch (Exception e) {}
                if (stmt != null) try { stmt.close(); } catch (Exception e) {}
                if (con != null) try { con.close(); } catch (Exception e) {}
            }
        }
    }

Conclusion

In this article we discussed how to connect to JDBC-ODBC Bridge in JAVA and integrate data without any coding. Click here to Download JDBC-ODBC Bridge Connector for JAVA and try yourself see how easy it is. If you still have any question(s) then ask here or simply click on live chat icon below and ask our expert (see bottom-right corner of this page).

Download JDBC-ODBC Bridge Connector for JAVA Documentation 


Other App Integration scenarios for JDBC-ODBC Bridge

Other Connectors for JAVA


Download JDBC-ODBC Bridge Connector for JAVA Documentation 

  • How to connect JDBC-ODBC Bridge in JAVA?

  • How to get JDBC-ODBC Bridge data in JAVA?

  • How to read JDBC-ODBC Bridge data in JAVA?

  • How to load JDBC-ODBC Bridge data in JAVA?

  • How to import JDBC-ODBC Bridge data in JAVA?

  • How to pull JDBC-ODBC Bridge data in JAVA?

  • How to push data to JDBC-ODBC Bridge in JAVA?

  • How to write data to JDBC-ODBC Bridge in JAVA?

  • How to POST data to JDBC-ODBC Bridge in JAVA?

  • Call JDBC-ODBC Bridge API in JAVA

  • Consume JDBC-ODBC Bridge API in JAVA

  • JDBC-ODBC Bridge JAVA Automate

  • JDBC-ODBC Bridge JAVA Integration

  • Integration JDBC-ODBC Bridge in JAVA

  • Consume real-time JDBC-ODBC Bridge data in JAVA

  • Consume realtime JDBC-ODBC Bridge API data in JAVA

  • JDBC-ODBC Bridge ODBC Driver | ODBC Driver for JDBC-ODBC Bridge | ODBC JDBC-ODBC Bridge Driver | SSIS JDBC-ODBC Bridge Source | SSIS JDBC-ODBC Bridge Destination

  • Connect JDBC-ODBC Bridge in JAVA

  • Load JDBC-ODBC Bridge in JAVA

  • Load JDBC-ODBC Bridge data in JAVA

  • Read JDBC-ODBC Bridge data in JAVA

  • JDBC-ODBC Bridge API Call in JAVA