Product Documentation

FairCom JDBC Developer's Guide

Previous Topic

Next Topic

User Authentication Detail

DriverManager.GetConnection() accepts three variants of user authentication detail:

  • User name and password passed as two character string arguments:

Connection con = DriverManager.getConnection (url, "ADMIN" "ADMIN" );

  • User name and password passed as a single Properties object:

Connection con = DriverManager.getConnection (url, prop );

Note that the FairCom DB SQL JDBC Driver expects the keys of the Properties object to be named user and password when it processes the object. Application code must use those names when it populates the Properties object:

prop.put("user", userid);

prop.put("password", passwd);

  • User name and password omitted. The FairCom DB SQL JDBC Driver connects to the database with a blank username and null password:

Connection con = DriverManager.getConnection (url);

TOCIndex