This one time, at band camp, CHEKKAL SAMIR (BADR) said:
CSB>I have confgured castor to use MS ACCESS database. I use the
sun.jdbc.odbc.JdbcOdbcDriver as the JdbcOdbc driver.
CSB>The insert of objects to this base work fine.
CSB>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:
CSB>
CSB>public Collection get(Class clazz) throws Exception {
CSB> Vector results = new Vector(0);
CSB> try {
CSB> String QueryStr = "SELECT clazz FROM " + clazz.getName() + "
clazz ";
CSB> query = db.getOQLQuery(QueryStr);
CSB> queryResults = query.execute(true);
CSB> System.out.println("queryResults.size: " + queryResults.size()); // I
get here the result = 2 which means that the result contains two elements that is right
CSB> 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
CSB>
CSB> results.add(queryResults.next());
CSB> }
CSB> return results;
CSB> } catch (Exception e) {
CSB> throw new e;
CSB> }
CSB>
CSB> }
Castor JDO cannot make use of the Sun JDBC-ODBC bridge. There is an FAQ item
about this available here:
http://www.castor.org/jdo-faq.html#I-have-encountered-problems-using-Sun-JDBC-ODBC-bridge-with-Castor...
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
The Castor Project
http://www.castor.org/
Apache Geronimo
http://incubator.apache.org/projects/geronimo.html
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev