Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

18.7.11 setUser

(a) Function

Sets an authorization identifier for database connection.

(b) Format
 
public void setUser ( String user ) throws SQLException
 
(c) Arguments

String user
Specifies an authorization identifier.
If the null value is specified, the current authorization identifier that had been set by this method is invalidated, and the setting is returned to its initial status.
(d) Return value

None.

(e) Functional detail

Sets an authorization identifier.

When one of the following methods is executed, the authorization identifier and password that were specified with the setUser and setPassword methods are used in establishing a physical connection to the database:

If the user argument is the null value, the JDBC driver assumes that no authorization identifier has been set by this method.

For details about how the JDBC driver handles the situation when there is no setting, see 18.11 Connection information priorities.

(f) Exceptions

If the length of the character string specified by the user argument is 0, this method throws an SQLException.