Windward DocumentationWindward CoreJava RESTful Engine User Manual ReferenceJDBC Driver Connection Strings for Java RESTful Engine

JDBC Driver Connection Strings for Java RESTful Engine

This is a guide to structuring your connection strings for SQLServer, MySQL, Oracle and DB2 databases, along with an example request bodies for each. If you don't know how to construct a request body, please refer to this article.

SQLServer

In the request body, you want to have:

  • Type = ado
  • ClassName = com.microsoft.sqlserver.jdbc.SQLServerDriver

The connection string should look like:

jdbc:sqlserver://{server_address};databaseName={database_name};username={username};password={password};

Here is an example request body:

<Template>
    <ConnectionString>{template_connection_string}</ConnectionString>
    <OutputFormat>pdf</OutputFormat>
     <Datasources>
        <Datasource>
                <Name>{db_name}</Name>
                <Type>ado</Type>
                <ClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</ClassName>
                <ConnectionString>jdbc:sqlserver://{server_address};databaseName={database_name};username={username};password={password};</ConnectionString>
        </Datasource>
    </Datasources>
</Template>

MySQL

In the request body, you want to have:

  • Type = ado
  • ClassName = com.mysql.cj.jdbc.Driver

The connection string should look like:

jdbc:mysql://{server_address}/{server_name};username={username};password={password};

Here is an example request body:

<Template>
    <ConnectionString>{template_connection_string}</ConnectionString>
    <OutputFormat>pdf</OutputFormat>
    <Datasources>
        <Datasource>
            <Type>ado</Type>
            <Name>MYSQL</Name>
            <ClassName>com.mysql.cj.jdbc.Driver</ClassName>
            <ConnectionString>jdbc:mysql://{server_address}/{server_name};username={username};password={password};</ConnectionString>
        </Datasource>
    </Datasources>
</Template>

Oracle

In the request body, you want to have:

  • Type = ado
  • ClassName = oracle.jdbc.OracleDriver

The connection string should look like:

jdbc:oracle:thin:@//{server_address};username={username};password={password};

Here is an example request body:

<Template>
    <ConnectionString>{template_connection_string}</ConnectionString>
    <OutputFormat>pdf</OutputFormat>
     <Datasources>
        <Datasource>
                <Name>{db_name}</Name>
                <Type>ado</Type>
                <ClassName>oracle.jdbc.OracleDriver</ClassName>
                <ConnectionString>jdbc:oracle:thin:@//{server_address};username={username};password={password};</ConnectionString>
        </Datasource>
    </Datasources>
</Template>

DB2

In the request body, you want to have:

  • Type = ado
  • ClassName = com.ibm.db2.jcc.DB2Driver

The connection string should look like:

jdbc:db2://{server_address}/{server_name};username={username};password={password};

Here is an example request body:

<Template>
    <ConnectionString>{template_connection_string}</ConnectionString>
    <OutputFormat>pdf</OutputFormat>
    <Datasources>
        <Datasource>
            <Type>ado</Type>
            <ClassName>com.ibm.db2.jcc.DB2Driver</ClassName>
            <ConnectionString>jdbc:db2://{server_address}/{server_name};username={username};password={password};</ConnectionString>
        </Datasource>
    </Datasources>
</Template>

0 Comments

Add your comment

E-Mail me when someone replies to this comment