1. Set the AuthenticationMethod property to auto or userIdPassword (default). See Using the AuthenticationMethod Property for more information about setting a value for this property.
  2. Set the User property to provide the user ID.
  3. Set the Password property to provide the password.
For example, the following is a connection string with only the required options for making a connection using authentication:
Connection conn = DriverManager.getConnection 
          ("jdbc:datadirect:sqlserver://server1:1433;
          AuthenticationMethod=userIdPassword;User=test;Password=secret");