title: Can I fix a DB2 Query Timeout through a configuration change alone?
body: <p>Can I fix a DB2 Connection Timeout through a configuration change alone?</p>
  
  <p>Note that I am running the following version of the db2 client connectivity software:</p>
  
  <pre><code>Y:\&gt;db2level
  DB21085I  Instance "DB2" uses "32" bits and DB2 code release "SQL08015" with
  level identifier "02060106".
  Informational tokens are "DB2 v8.1.5.449", "s040212", "WR21334", and FixPak
  "5".
  </code></pre>
  
  <p>I noticed that when I brought up the Configuration Assistant that there seemed to be a connection-level option for setting the QueryTimeout value:</p>
  
  <p><img src="https://i.stack.imgur.com/q8pxe.png" alt="enter image description here">
  However, I wanted to change the value. Since there was no "Update" button, only an Add, I thought that I might have to Delete the setting and re-add it to modify it. however, when I went to re-add it, the QueryTimeOout setting was not in my list.</p>
  
  <p><img src="https://i.stack.imgur.com/U80ut.png" alt="enter image description here"></p>
  
  <p>It may be that I updated a config file somewhere and this is how the asetting was first introduced. I don't remember. </p>
  
  <ol>
  <li><p>I would like to know where I can find the location of the file
  which contains these settings. </p></li>
  <li><p>This setting <em>is</em> available on another person's PC who has a newer version of the db2
      client. Will setting it to 0 on his PC override any default CommandTimeout
      setting in the program? Note that the query does not timeout on my PC, only on the other user's PC.</p></li>
  <li><p>I tried to change my ConnectionString in
      the app.config file of this WinForm app to include the option
      "QueryTimeout=0"</p></li>
  </ol>
  
  <p>connectionString="Database=MyServer;Server=MyHost.MyCompany.com:MyPortNumber;UID=MyuserId;PWD=MyPassword;QueryTimeout=0"</p>
  
  <p>but I get the following error:</p>
  
  <p>Additional information: Invalid argument</p>
  
  <p><a href="http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.swg.im.dbclient.adonet.ref.doc/doc/DB2ConnectionClassConnectionStringProperty.html" rel="nofollow noreferrer">Here</a> is the documentation on this ConnectionString setting   . What am I doing wrong?</p>
  
  <p>Gets or sets the value of the QueryTimeout keyword. The QueryTimeout indicates the default number of seconds to wait for an SQL statement or XQuery expression to complete executing before attempting to cancel the execution and return control to the application. This attribute overrides the default 30 second DB2Command.CommandTimeout value.</p>