title: Exception: java.sql.SQLException: Could not position within a table (informix.tblName)
body: <blockquote>
    <p>Query: my_table is a <strong>view</strong> not a table</p>
  </blockquote>
  
  <pre><code>static final String query= 
      "SELECT "+MailboxId+", " + 
      Action+", " + 
      ActionType+", " + 
      MsgType+", " + 
      Priority+", " + 
      MsgID+", " + 
      MsgCountsSequenceNumber+", " + 
      MsgCounts+", " + 
      TimeOfEvent+"  " + 
      "FROM my_table " + 
      "ORDER BY TimeOfEvent;";
  
  public ResultSet executeQuery(Statement st, String query) throws SQLException
  {
      boolean isDeadlock= false;
      ResultSet rs = null;
      int retries= deadlockRetries;
      do {
          try {
              rs = st.execute(query); //here it produces exception 
          } catch (SQLException e) {
              if (e.getErrorCode() == SQLERR_DEADLOCK) {
                  diag_log(LOG, "Deadlock exception generated during execute query=", sqlQuery, ".  Retries=", Integer.toString(retries));
                  isDeadlock= true;
                  synchronized(_lock) {
                      deadlockCount++;
                  }
              }
              else {
                  diag_log(LOG, "SQL Exception: ", Integer.toString(e.getErrorCode()), " query=", sqlQuery, " exception= ", e.getMessage() != null ? e.getMessage() : "unavailable"); // this log gets printed
                  throw e;
              }
          }       
  
      } while (isDeadlock &amp;&amp; retries-- &gt; 0);
      return rs;
  }
  </code></pre>
  
  <p>Logs:</p>
  
  <blockquote>
    <p>Failed to read database Mydyndb with query SELECT MailboxId, Action, ActionType, MsgType, Priority, MsgID, MsgCountsSequenceNumber, MsgCounts, TimeOfEvent FROM my_table ORDER BY TimeOfEvent;. TECHNICAL DETAILS: <strong>Exception: java.sql.SQLException: Could not position within a table</strong> (informix.my_table).</p>
  </blockquote>
  
  <p>Need to know the reason for this exception</p>