skip to main content
Using the driver : Connecting from an application : Connecting Using the JDBC Driver Manager
  

Try DataDirect Drivers Now

Connecting Using the JDBC Driver Manager

One way to connect to a Salesforce instance is through the JDBC Driver Manager using the DriverManager.getConnection() method. This method specifies a string containing a connection URL. This example shows how to establish a connection to a data source:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sforce://login.salesforce.com;User=abc@defcorp.com;
Password=secret;SecurityToken=XaBARTsLZReM4Px47qPLOS");
* Passing the Connection URL
* Testing the Connection