Is there a sample application that I can use to test the TDV JDBC driver?

Is there a sample application that I can use to test the TDV JDBC driver?

book

Article ID: KB0081062

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization v 7.0.0 and higher

Description

Is there a sample application that I can use to test the TDV JDBC driver?

Issue/Introduction

Is there a sample application that I can use to test the TDV JDBC driver?

Resolution

You can verify that the JDBC  driver is working  by using the JdbcSample application present in your TDV installation. The application is located  under <TDV_INSTALL_DIR>\apps\jdbc. It will allow you to connect to the server and run a SQL query. The steps to use the application are below.

(1)  Open <TDV_INSTALL_DIR\>apps\jdbc\JdbcSample.bat (Windows) or <TDV_INSTALL_DIR>\apps\jdbc\dbcSample.sh (Linux) with a text editor.

(2)   Check whether the JAVA_HOME variable is set. If the variable is not set, edit it to point at your installation's jre folder as shown in the example below, and then save the change.

Example : set JAVA_HOME=C:\apps\tdv760\jre

(3)  Close the text editor. Run the application using the following syntax:

On Windows: JdbcSample.bat <datasource name> <host name> <port> <user> <password> <domain name> "<sql statement>"

On Linux:  ./JdbcSample.sh <datasource name> <host name> <port> <user> <password> <domain name> "<sql statement>"

Note: Make sure that you enter Base Port + 1 as the port. For instance, if the server is running at port 9400, then the JDBC port is 9401.

Example
C:> cd C:\apps\tdv760\apps\jdbc

JdbcSample.bat examples localhost 9451 admin admin composite "SELECT CompanyName from ViewOrder"

Results
    row = `1`   col[1]=`Able Computing`
    row = `2`   col[1]=`Anston Systems`
    row = `3`   col[1]=`Dickinson Associates`


User-added image