title: Specify schema/instance for DB2 query in connection string
body: <p>I am trying to specify the default schema/instance as part of a connection string (or specific command) so it does not need to be part of the query.</p>
  
  <pre><code>OdbcConnection conn = new OdbcConnection("Driver={IBM DB2 ODBC DRIVER}; Database=myDB; Hostname=myHostName; Port=myPort; Protocol=TCPIP; Uid=myID; Pwd=myPW;");
  OdbcCommand comm = new OdbcCommand("select count(*) from customers", conn);
  conn.Open();
  var value = comm.ExecuteScalar();
  conn.Close();
  </code></pre>
  
  <p>Unfortunately this fails with the error:</p>
  
  <blockquote>
    <p>ERROR [42S02] [IBM][CLI Driver][DB2] SQL0204N <strong>myID</strong>.customers is an undefined name. SQLSTATE=42704.</p>
  </blockquote>
  
  <p>Notice it's using <strong>myID</strong> where the Schema/Instance should be. If I specify the schema/instance explicity:</p>
  
  <pre><code>OdbcCommand comm = new OdbcCommand("select count(*) from mySCHEMA.customers", conn);
  </code></pre>
  
  <p>it works as expected. I'd like to specify <code>mySCHEMA</code> as part of the Connection String, similar to "Initial Catalog" when using MS SQL Server.</p>
  
  <p>After a bunch of experimentation and googling, I can't seem to figure it out. Any ideas?</p>