DB2®ConnectionStringBuilder.ClientUserID property

Gets or sets the value of a client user ID that is sent to a database.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax

[Visual Basic]
Public Property ClientUserID As String
[C#]
public string ClientUserID {get; set;}
[C++]
public: __property String* ClientUserID();
public: __property void set_ClientUserID(String*);
[JScript]
public function get ClientUserID() : String;
public function set ClientUserID(String);

Property value

 The IBM® Data Server Provider for .NET has limit of 255 characters for the ClientUserID property.

Database servers enforce different limitation in the length of the value and can truncate it. Note the following conditions:
  • Db2® for z/OS® Version 11 servers in new function mode (NFM) support a length of up to 128 characters for the CURRENT CLIENT_USERID special register.
  • Db2 for z/OS Version 10 and earlier servers support a length of up to 16 characters.
  • Db2 for z/OS servers remove trailing spaces that are specified in the ClientUserID property value.
  • Db2 for IBM i V6R1 and later servers support a length of up to 255 characters.
To ensure that the data is converted correctly when transmitted to Db2 for z/OS Version 9 and earlier servers, use only the characters A-Z and 0-9 and the underscore (_) or period (.).

The ClientUserID property value in the DB2ConnectionStringBuilder class is stored in the Db2 special register (CURRENT CLIENT_USERID).

The ClientUserID property must be set before the start of a transaction. Changes to the ClientUserID property after the start of a transaction do not take effect until the start of the next transaction.