Connecting Using the JDBC Driver Manager
- 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
One way to connect to a database is through the JDBC Driver Manager using the DriverManager.getConnection() method. This method specifies a string containing a connection URL. The following example shows using the JDBC Driver Manager to connect to Microsoft SQL Server.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:sqlserver://server1:1433;User=test;Password=secret");