Syntax

    
jdbc:datadirect:sforce://servername[;property=value[;...]]

where:

servername
specifies the URL of the Salesforce instance to connect to, for example, login.salesforce.com or test.salesforce.com. If you do not specify ServerName, login.salesforce.com is used as the value.
property=value
specifies connection properties. For a list of connection properties and their valid values, see Connection Properties.

Example 1

This example specifies a Salesforce instance configured for a security token. The driver attempts to establish a connection for the user 123@abccorp.com:


jdbc:datadirect:sforce://login.salesforce.com;User=123@abccorp.com;
Password=secret;SecurityToken=XaBARTsLZReM4Px47qPLOS
Note: A security token is not required when Salesforce has been configured for Trusted IP Ranges and the user is logging in from a trusted IP address. Refer to "Set Trusted IP Ranges for Your Organization" in your Salesforce documentation for details.

Example 2

This example specifies the Salesforce instance test.salesforce.com. The driver attempts to establish a connection to the test sandbox for the user test@abccorp.com:


jdbc:datadirect:sforce://test.salesforce.com;User=test@abccorp.com;
Password=secret

Example 3

This example does not specify a Salesforce instance; therefore, login.salesforce.com is used as the instance:


jdbc:datadirect:sforce:User=test;Password=secret
Note: User and Password are required properties, but they do not have to be specified in the connection URL. They can be specified as arguments to the Connection.getConnection() method.