[Visual Basic]
Public Property BatchCommandTimeout As Integer
[C#]
public int BatchCommandTimeout {get; set;}
[C++]
public: __property int get_BatchCommandTimeout();
public: __property void set_BatchCommandTimeout(int);
[JScript]
public function get BatchCommandTimeout() : int;
public function set BatchCommandTimeout(int);
You can change the BatchCommandTimeout property value only before you call the EndChain() method.
The default value for the BatchCommandTimeout property is 60 seconds.
If you set the BatchCommandTimeout property to 0, no timeout can occur.
The BatchCommandTimeout property value overrides the CommandTimeout and QueryTimeout property values.
DB2Connection connection = new DB2Connection("database=sample;");
connection.Open();
connection.BeginChain();
/* Chain of SQL statements to execute using DB2Command object */
/* Setting command timeout for this chain, increasing it to 90 secs from default 60 secs */
connection.BatchCommandTimeout = 90;
connection.EndChain();
connection.Close();