Menu
Simba Technologies
Simba Technologies

Simba Salesforce JDBC Driver with SQL Connector 2.1.18
Installation and Configuration Guide

Initializing the Driver Class

Before connecting to Salesforce.com, you must initialize the appropriate class for your data store and your application.

The Simba Salesforce JDBC Driver provides the following fully-qualified class names (FQCNs) to support JDBC 4.0 connections to Salesforce.com:

  • com.simba.salesforce.jdbc4.Driver
  • com.simba.salesforce.jdbc4.DataSource

The Driver class extends java.sql.Driver, and the DataSource class extends javax.sql.DataSource and javax.sql.ConnectionPoolDataSource.

The following sample code shows how to use the DriverManager to establish a connection:

private static Connection connectViaDM() throws Exception

{

Connection connection = null;

Class.forName(DRIVER_CLASS);

connection = DriverManager.getConnection(CONNECTION_URL);

return connection;

}

The following sample code shows how to use the DataSource class to establish a connection:

private static Connection connectViaDS() throws Exception

{

Connection connection = null;

Class.forName(DRIVER_CLASS);

DataSource ds = new com.simba.salesforce.jdbc4.DataSource();

ds.setURL(CONNECTION_URL);

connection = ds.getConnection();

return connection;

}