title: When I run SQL query from RIDE it gives error
body: <p>I am having this problem,</p>
  
  <p>When I send an SQL query as an argument it gives error
  when I use the same query directly in my java program it works fine.</p>
  
  <p>MY SQL query when I send as an argument is as follow</p>
  
  <pre><code>Select RATINGPERIOD from INVESTMENT.I1INVE Where INVESTMENTID = 100
  
  rs = stmt.executeQuery(sqlQery); //    Select RATINGPERIOD from INVESTMENT.I1INVE Where INVESTMENTID = 100
  </code></pre>
  
  <p>and when I use it directly into my java program is as follow</p>
  
  <pre><code>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);                 
  
              // Create the Statement
              stmt = con.createStatement();                                            
              System.out.println("**** Created JDBC Statement object");
  
              // Execute a query and generate a ResultSet instance
              rs = stmt.executeQuery("Select RATINGPERIOD from INVESTMENT.I1INVE where INVESTMENTID = 100");
  
              while (rs.next()) {
  
                  delay = rs.getString("RATINGPERIOD");
                  System.out.println("size of list ="+delay);
  
              }
          }
  
  Error log
      com.ibm.db2.jcc.am.SqlException: [jcc][10103][10941][3.62.57] Method executeQuery cannot be used for update. ERRORCODE=-4476, SQLSTATE=null
      at com.ibm.db2.jcc.am.fd.a(fd.java:660)
      at com.ibm.db2.jcc.am.fd.a(fd.java:60)
      at com.ibm.db2.jcc.am.fd.a(fd.java:120)
      at com.ibm.db2.jcc.am.jn.a(jn.java:4129)
      at com.ibm.db2.jcc.am.jn.a(jn.java:2875)
      at com.ibm.db2.jcc.am.jn.a(jn.java:679)
      at com.ibm.db2.jcc.am.jn.executeQuery(jn.java:663)
      at com.profitsoftware.testing.utils.keywords.date.DatabaseSQL.sqlQuery(DatabaseSQL.java:46)
      at com.profitsoftware.testing.utils.keywords.date.DatabaseSQLKeywords.executeSqlQuery(DatabaseSQLKeywords.java:18)com.
  </code></pre>
  
  <p>ok some more information, I have assigned sql query to a string in Java program and then compared it to the query(String) I was getting as argument in my java program and it gives false. which explain maybe when query is passed from RIDE to Java programm it changes somehow. any idea what happens there ?</p>
  
  <p>Thanks in advance and sorry if it sounds a stupid question, I a new to this programming world.</p>
  
  <p>oK, It started to work, actually I was missing something there, so type. My logic itself was good but it was typo that created the problem</p>
  
  <p>--Sara</p>