hi. I think it's because you are using SQL instead of OQL for the query.
look at this link on the castor site for an intro to OQL: http://www.castor.org/oql.html Although i haven't tested this I think there is a way to pass SQL through castor but I would only see a purpose in doing that if you had some performance issues or some complexe/db specific stuff to do that OQL could not handle. Florian Hehlen -----Original Message----- From: * * [mailto:mrcdbs@;hotmail.com] Sent: Friday, October 25, 2002 10:26 AM To: [EMAIL PROTECTED] Subject: [castor-dev] OQLQuery Hi, Thanks for helping me with xerces.jar I've got all up and running i no time. I have a question on how to retive objects form my database. It seems that I cans store and remove but how do I query? For example: I have a class user, with name and id, say also that I have 3 persons stored in the databse. way dosen't this work for me? oql = db.getOQLQuery("SELECT * FROM user"); results = oql.execute(); while(results.hasMore()) { user ud = (user) results.next(); System.out.println(ud.getName()); } _________________________________________________________________ Hela veckans v�der http://www.msn.se/vader ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
