title: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704
body: <p>I created local database in DB2 called "<code>TestDB</code>" then I created table called "<code>TestTable</code>".<br>
  I found that the table is put under schema name is "<code>yasmin</code>".<br>
  I am trying to connect to the <code>DB2</code> database using <code>JDBC</code> but I got this exception</p>
  
  <pre><code>    R SQLException information
  [1/4/14 11:32:59:289 EST] 0000004d SystemErr     R Error msg: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.TESTTABLE, DRIVER=3.61.86
  [1/4/14 11:32:59:290 EST] 0000004d SystemErr     R SQLSTATE: 42704
  [1/4/14 11:32:59:290 EST] 0000004d SystemErr     R Error code: -204
  [1/4/14 11:32:59:290 EST] 0000004d SystemErr     R com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.TESTTABLE, DRIVER=3.61.86
  </code></pre>
  
  <p>I tried many solutions on the internet Like set schema but unfortunately doesn't work.</p>
  
  <p>This is the JDBC code I used</p>
  
  <pre><code> String urlPrefix = "jdbc:db2:";
          String url;
          String user;
          String password;
          String empNo;                                                              
          Connection con;
          Statement stmt;
          ResultSet rs;
  
          url = urlPrefix + "//127.0.0.1:50000/TestDB";
          user = "db2admin";
          password = "db2admin";
          try 
          {                                                                        
            // Load the driver
            Class.forName("com.ibm.db2.jcc.DB2Driver");                              
            System.out.println("**** Loaded the JDBC driver");
  
            // Create the connection using the IBM Data Server Driver for JDBC and SQLJ
            con = DriverManager.getConnection (url, user, password);                 
            // Commit changes manually
  
            con.setAutoCommit(false);
            System.out.println("**** Created a JDBC connection to the data source");
            stmt = con.createStatement();   con.createStatement();                                         
            System.out.println("**** Created JDBC Statement object");
            // Execute a query and generate a ResultSet instance
  
            rs = stmt.executeQuery("select *from TestTable");                   
            System.out.println("**** Created JDBC ResultSet object");
          }
  
          catch (ClassNotFoundException e)
          {
            System.err.println("Could not load JDBC driver");
            System.out.println("Exception: " + e);
            e.printStackTrace();
          }
  
          catch(SQLException ex)                                                      
          {
            System.err.println("SQLException information");
            while(ex!=null) {
              System.err.println ("Error msg: " + ex.getMessage());
              System.err.println ("SQLSTATE: " + ex.getSQLState());
              System.err.println ("Error code: " + ex.getErrorCode());
              ex.printStackTrace();
              ex = ex.getNextException(); // For drivers that support chained exceptions
            }
          }
  </code></pre>