Salesforce Data Source

This article includes information about how to install the JDBC driver for Salesforce, how to connect to a Salesforce database, and a list of the Salesforce data types that  supports. With the JDBC driver installed, the Salesforce data source is available as an option in the connection wizard when creating an API.
lac52
This article includes information about how to install the JDBC driver for Salesforce, how to connect to a Salesforce database, and a list of the Salesforce data types that 
CA Live API Creator
 supports. With the JDBC driver installed, the Salesforce data source is available as an option in the connection wizard when creating an API.
In this article:
 
 
Install the JDBC Driver for Salesforce
The self-contained, single-user version of 
CA Live API Creator
 that is based on Jetty includes the JDBC driver for Salesforce. The JDBC driver is located in the 
%JETTY_HOME%/caliveapicreator/lib/ext
 directory. If you have installed this version of 
CA Live API Creator
, no additional steps are required to install the JDBC driver.
If you have installed 
CA Live API Creator
 on another Java container, such as Apache Tomcat, copy the 
cdata.jdbc.salesforce.jar
 JAR file (the JDBC driver) that is located in the 
databaseDrivers
 directory into the directory that is based on the Java container on which you have installed 
CA Live API Creator
:
Apache Tomcat
Copy the JDBC driver into the 
%{CATALINA_HOME}/lib
 directory
Oracle WebLogic
Copy the JDBC driver to the 
<Your WebLogic Domain Directory>/lib
 directory.
JBoss/WildFly
For more information, see Install on JBoss.
IBM WebSphere
Add the JDBC driver to your Web application server.
Using the WebSphere administrative console, create a JDBC provider for the driver in the server.
For more information about how to create a JDBC provider, see the IBM WebSphere documentation.
For more information:
Connect to a Salesforce Database
You can connect to your Salesforce database using the following methods:
  • (If you have not created your API yet) When you create your API.
    For more information about how to create an API, see Creating APIs.
  • (If you have an existing API) By adding a connection to a Salesforce data source.
    For more information about how to add a connection to a data source, see Database Connectivity
The following procedure details how to connect to your Salesforce database when creating your API.
Connect to one of your Salesforce instances using the Salesforce JDBC driver that you have added as a library in API Creator.
Prerequisites: 
Before you connect to one of your Salesforce instances, verify that you have completed the following:
  • You know your Salesforce connection information.
    • You have a Salesforce user name and password. For example, [email protected]
    • You have a generated Salesforce security token.
      For more information about how to generate the security token, see the Salesforce documentation.
  • You have ensured that your Salesforce account has the API Enabled permission set.
  • You have determined which production, sandbox or dev environment you are going to use.
Follow these steps:
 
  1. In API Creator, on the APIs page, click 
    Create New API
    .
    The connection wizard opens.
  2. Click 
    Database First
    .
  3. Select 
    Salesforce
     as the data source type.
  4. Complete the 
    Username
    Password
    , and 
    Security Token
     fields based on the information for your Salesforce account.
  5. (Optional) If you want to connect to a Salesforce sandbox environment, select the 
    Use Sandbox
     checkbox and then enter the name of the sandbox in the 
    Sandbox Name
      field.
    Your username is appended with a period(.) followed by the sandbox name.
  6. Click 
    Continue
    .
You are connected to the Salesforce database.
Salesforce Supported Data Types
You can read and write the following Salesforce data types:
Data type
Modeled as...
Notes
base64
binary
boolean
boolean
byte 
Bitmask
date
SimpleDate
For more information about how to use this data type in JavaScript, see the Date, Time, Timestamp, and TimestampOffset.
datetime
SimpleTimestampOffset
For more information about how to use this data type in JavaScript, see the Date, Time, Timestamp, and TimestampOffset.
double
decimal
int
decimal
float
number
string
string
time
SimpleTime
For more information about how to use this data type in JavaScript, see the Date, Time, Timestamp, and TimestampOffset.
 Salesforce requires Transport Layer Security (TLS) encryption protocol version 1.1 or higher. You can enable TLS 1.1 and TLS 1.2 explicitly by adding the following line to your startup command for Apache Derby or Tomcat:
(-Dhttps.protocols=TLSv1.1,TLSv1.2)
For more information: