title: Enumerate tables in iSeries DB2 from C#/ODBC
body: <p>I need to enumerate all tables (by that I mean get a list of schema and table name strings) and views in an iSeries DB2 database (I believe version 7, but I could be wrong) for which I have an ODBC connection. I tried:</p>
  
  <pre><code>show tables
  select * from syscat.tables
  </code></pre>
  
  <p>However, the server responds with unknown command for <code>show tables</code> and unknown table for select respectively:</p>
  
  <blockquote>
    <p>ERROR [42S02] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0204 - TABLES in SYSCAT type *FILE not found</p>
  </blockquote>
  
  <p>I know that it is somehow possible to enumerate tables because Visual Studio does it from the Server Explorer. I am probably overlooking something very obvious but I am not really versed in ODBC. Thanks.</p>