Hello,
I have confgured castor to use MS ACCESS database. I use the 
sun.jdbc.odbc.JdbcOdbcDriver as the JdbcOdbc driver.
The insert of objects to this base work fine.
The probleme I encountered is that when I want to get all the object of a certain 
class from the database. Look at this method:

public Collection get(Class clazz) throws Exception {
        Vector results = new Vector(0);
        try {
                String QueryStr =  "SELECT clazz FROM " + clazz.getName() + " clazz ";
                query = db.getOQLQuery(QueryStr);
                queryResults = query.execute(true);
                System.out.println("queryResults.size: " + queryResults.size());  // I 
get here the result = 2 which means that the result contains two elements that is right
                while (queryResults.hasMore()) {   // but here I get an exception 
telling that there is no data; if I replace hasMore method by hasMoreElements there is 
no                                              // Exception but it doesn't retrieve 
the results

                        results.add(queryResults.next());
                }
                return results;
        } catch (Exception e) {
                throw new e;
        }
        
    }

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to