3. Passing the Connection URL
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
After registering the drivers, pass the connection information in the form of a connection URL. This example establishes a connection to a Microsoft SQL Server database and includes user ID and password information for the connection:
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sqlserver://server1:1433;User=test;Password=secret");
The following sections provide URL formats that you can use as templates to create your own connection URLs, substituting the appropriate values for your database: