JDBC connectors > JDBC output connector

JDBC output connector
The JDBC output connector is used to insert or update data in relational databases. In the connector configuration you specify the appropriate JDBC driver and Connection URL settings to connect to the database, and the SQL query to execute on the selected database.
XMLOUT Process
The output sent via the JDBC output connector is configured using an XMLOUT Process. The XML structure is shown in the example below.
<?xml version="1.0"?>
<document>
  <job>
    <event>
      <block>
        <field name="column_1">value_1</field>
        <field name="column_2">value_2</field>
        ....
        <field name="column_N">value_N</field>
      </block>
    </event>
  </job>
</document>
Figure 1
 
<event>
The <event> element contains all the rows to be added to the database table.
<block>
<field>
The name attribute represents the column (column_1, column_2, etc.). The attribute value must be the same as the column name in the database.
JDBC output connector settings
Connector type
Select Java.
Java class
Select JDBCOutConnector. When you click the button attached to this field, all available Java output connector classes are displayed. To activate the JDBC output connector settings you must select the java class JDBCOutConnector.
JDBC driver
The JDBC driver to use to connect to the database. You can select the following drivers from the drop-down list:
sun.jdbc.odbc.JdbcOdbcDriver
com.streamserve.www.jdbc.sqlserver.SQLServerDriver 
com.streamserve.www.jdbc.oracle.OracleDriver
com.streamserve.www.jdbc.db2.DB2Driver
If you are using other drivers than the above, you can enter the corresponding driver expression in this field.
Connection URL
The connection URL to connect to the database. You can select and edit the following Connection URLs from the drop-down list:
jdbc:odbc:DB
jdbc:odbc:myDatabase
jdbc:streamserve:sqlserver://server[:port];databaseName=DB
jdbc:streamserve:sqlserver://localhost:1433;databaseName=myDatabase
jdbc:streamserve:oracle://server[:port];SID=DB
jdbc:streamserve:oracle://localhost:1433;SID=myDatabase
jdbc:streamserve:db2://server[:port];DatabaseName=DB
jdbc:streamserve:db2://localhost:50000;DatabaseName=myDatabase
If you are using other drivers than the above, you can enter the corresponding Connection URL in this field.
User name
A user name to access the database. Overrides any other user names specified in the Connection URL.
Password
A password to access the database. Overrides any other passwords specified in the Connection URL.
SQL file
You can create an SQL file where you enter the query to submit to the database. This query overrides any query specified in the SQL command field described below.
If you use the SQL file option to specify the query, you can create more complex queries using several lines of statements.
Example 32
INSERT INTO myTable *
 
SQL command
You can enter a one-line query in the SQL command field.
Example 33
INSERT INTO myTable *
 
License Password
Password for the JDBC driver (if required). If you are using any of the DataDirect JDBC drivers included in the StreamServe installation you should leave this field blank.
 
 
 
OpenText StreamServe 5.6 Updated: 2013-03-01