Hi

I'm using the "standard/example" code to copy a series of values from a
result set (based on a query to an Oracle database) into an ArrayList for
later use.

The code is as follows 

      ResultSet rs = stmt.executeQuery(sql);
      ArrayList results = new ArrayList(); 
      ResultSetDynaClass rss = new ResultSetDynaClass(rs);

       BasicDynaClass bdc =
           new BasicDynaClass("foo", BasicDynaBean.class,
                              rss.getDynaProperties());

       Iterator rows = rss.iterator();

       while (rows.hasNext()) {
           DynaBean oldRow = (DynaBean) rows.next();
           DynaBean newRow = bdc.newInstance();
           PropertyUtils.copyProperties(newRow, oldRow);
           results.add(newRow);
       }


But there only seems to be one row in the results ArrayList, despite there
being 5 rows in the database.

Does anybody know why this could be so?

Thanks in advance.

Derek

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to