Getting Started
:
Connecting Using the JDBC Driver Manager
Try DataDirect Drivers Now
Connecting Using the JDBC Driver Manager
One way to connect to a database is by using the JDBC
DriverManager.getConnection()
method. As the following example shows, this method specifies a string containing a connection URL.
Connection conn = DriverManager.getConnection
("jdbc:datadirect:mongodb://MyServer:27017;DatabaseName=Test;
SchemaMap=MyUserProfile\\AppData\\Local\\Progress\\DataDirect\\MongoDB_Schema\\MyServer.config;
UserName=admin;Password=adminpass");
In this section:
Setting the Classpath
Passing Connection URLs
Testing the Connection