DB2ConnectionStringBuilder.ClientAccountingString property

Gets or sets the ClientAccountingString property that contains the string value sent to the database.

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

Syntax

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

Property value

 The IBM® Data Server Provider for .NET has limit of 255 characters for the ClientAccountingString 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 255 characters.
  • Db2 for z/OS Version 10 and earlier servers support a length of up to 200 characters.
  • 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 ClientAccountingString property value in the DB2ConnectionStringBuilder class is stored in the Db2 special register (CURRENT CLIENT_ACCTNG).

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

Db2 for z/OS servers use the ClientAccountingString property value in the DB2ConnectionStringBuilder class to classify work.