Overload 1

Parameters:

URL The XDB Server URL (String)
AuthID The AuthID used to log on to the XDB Server (String)
Password The password associated with the AuthID (String)
Connection Properties Data connection properties defined in the URL itself or in a data profile

Comments:

Use Overload 1 if you:

  • Only have a few properties values to set
  • Have defined a data profile in which most of the values of the data connection properties are set
  • Do not want to define a Properties Object
  • Need to change from using the Direct Flight driver to other JDBC drivers in your code

Examples:

This example uses Overload 1 to define property values without instantiating a Properties Object:

void Connection login (String sUser, String sPassword) {
             
            String sURL =  “jdbc:mf://myhost?timeout=-1”;

            //Connect to the database
            return DriverManager.getConnection(sURL, sUser, sPassword);

}

This example uses Overload 1 to load property values from a data profile defined in the SYSXDB.SYSPROFILES table:

void Connection login (String sUser, String sPassword) {
          
            String sURL =  “jdbc:mf://myhost/myprofile”;

            //Connect to the database
            return DriverManager.getConnection(sURL, sUser, sPassword);

}