Get Started with KingswaySoft JDBC Driver Pack

Overview

KingswaySoft JDBC Driver Pack is a package of lightweight JDBC drivers that connect to many proprietary APIs to help facilitate data reading and writing like working with a database system using the versatile SQL commands. This guide quickly walks you through installation, licensing, connection setup, and SQL command executions, etc.

Prerequisites

The following are some of the prerequisites in order to use or operate the driver.

  • JDK 1.8 or later
  • The kingswaysoft.jdbc.jar library available from the downloaded package
  • A valid license - The driver pack automatically starts a free trial license which is valid for 30 days upon first use

Installation

After you have downloaded the driver pack, you should extract the .zip file in order to obtain the following library to be used in your project.

  • kingswaysoft.jdbc.jar : A pure Java Type 4/5 JDBC Driver, compiled with JDK 1.8, designed to enable seamless JDBC connectivity.

Connecting via DriverManager

To connect using the DriverManager class, follow standard JDBC conventions with the KingswaySoft JDBC Driver Pack. Begin by loading the driver class first, and then proceed to establish the connection.

Step 1: Load the Driver (Optional for JDBC 4.0+)

Modern JDBC drivers auto-register. Only include this if using legacy environments:

Class.forName("com.kingswaysoft.jdbc.Drivers");
Step 2: Establish a Connection

To establish a connection, invoke the getConnection method of the DriverManager class and initiate the connection string with the prefix "jdbc:kingswaysoft:", and replace the API Name accordingly.

Connection connection = DriverManager.getConnection("jdbc:kingswaysoft:ServiceName=API Name;", null);

You can configure connection options by creating a Properties object and setting the appropriate properties before passing the object to the DriverManager.

Properties connectionProps = new Properties();
connectionProps.put("UserName", "username");
connectionProps.put("Password", "password");
connectionProps.put("Domain", "domain");

Connection connection = DriverManager.getConnection("jdbc:kingswaysoft:ServiceName=API Name;", connectionProps);

For additional details on configuring connection settings, refer to the Connection Settings section in each Driver.

Connecting via DataSource

For connection pooling or JNDI integration, use JdbcDriverPackDataSource class as the alternative option.

JdbcDriverPackDataSource ds = new JdbcDriverPackDataSource
    ("jdbc:kingswaysoft:ServiceName=API Name;...", connectionProps);

Connection connection = ds.getConnection();