Connection URL
- Last Updated: August 23, 2024
- 1 minute read
- DataDirect Connectors
- JDBC
- Salesforce 6.0
- Documentation
After setting the CLASSPATH, the required connection information needs to be passed in the form of a connection URL.
jdbc:datadirect:sforce://servername;User=username;Password=password;
SecurityToken=value[;property=value[;...]]
Note:
- Connection property names are case-insensitive. For example,
Passwordis the same aspassword. - For connection properties that support string values, use the following
escape sequence to specify values containing leading or trailing spaces and
curly brackets:
{value}. For example:User={hello }orPassword={{hello}}.
where:
- servername
- specifies the base Salesforce URL to use for logging in. The
default is
login.salesforce.com.
- User
- specifies the user name that is used to connect to the Salesforce instance.
- Password
- specifies the password to use to connect to your Salesforce instance. A security token may be appended to the password. See "Password" for details.
Important: Setting the password using a data source is not
recommended. The data source persists all properties, including the Password
property, in clear text.
- SecurityToken
- specifies the security token required to make a connection to a Salesforce instance that is configured for a security token. If a security token is required and you do not supply one, the driver returns an error indicating that an invalid user or password was supplied. A security token may be appended to the password. See "SecurityToken" for details.
Important: If setting the security token using a data
source, be aware that the SecurityToken property, like all data source properties,
is persisted in clear text.
The following examples show how to establish a connection to a Salesforce instance.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sforce://login.salesforce.com;User=abc@defcorp.com;
Password=secret;SecurityToken=XaBARTsLZReM4Px47qPLOS");