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");