Hi Werner, Actually I was just showing a simple example (Guideline 5.) in order to get the functionality working. I actually would like to implement subqueries, joins, etc.... Can subqueries be done other than with pass-through SQL? A quick little question: Where can I get information on Views? How to create them and so on.... Vielen Dank Manuel [email protected] schrieb am 07.12.05 18:25:39:
Hi Manuel,
it looks like you wanted to use a plain OQL query rather than a CALL SQL query, as a query such as
SELECT p.usrAbbrev FROM com.client.mapping.MapUserNew p WHERE p.usrAb!
brev=?
definitely is supported by Castor JDO out of the box.
Simply try to create and execute a OQLQuery similar to ...
OQLQuery query = db.getOQLQuery("SELECT p.usrAbbrev FROM com.client.mapping.MapUserNew \ p WHERE p.usrAbbrev=?"); query.bind(new Integer(1000)); OQLResults results = query.execute();
Regards Werner
Manuel Castrillon wrote: > > Hi > > I get the following error when I use the pass-through SQL method: > > query="CALL SQL SELECT p.usrAbbrev FROM com.client.mapping.MapUserNew p > WHERE p.userAbbrev=$1 AS com.client.mapping.MapUserNew" > > OQLQuery oql = db.getOQLQuery( query ); > oql.bind("TH62ZD"); > > /DEBUG [AWT-EventQueue-0] (//SQLEngine.java:441//) - Direct SQL call: > SELECT p.usrAbbrev FROM com.client.mapping.MapUserNew p WHERE p.usrAbbrev=?/ > > /DEBUG [AWT-EventQueue-0] (//ConnectionProxy.java:86//) - Creat!!
ing > instance of ConnectionProxy for calling class > org
.castor.jdo.engine.DriverConnectionFactory/ > > /DEBUG [AWT-EventQueue-0] (//ConnectionProxy.java:267//) - Creating JDBC > Statement for Connection instance with SELECT p.usrAbbrev FROM > com.client.mapping.MapUserNew p WHERE p.usrAbbrev=?/ > > /DEBUG [AWT-EventQueue-0] (//PreparedStatementProxy.java:97//) - > Creating prepared statement proxy for SQL statement SELECT p.usrAbbrev > FROM com.airbus.etool.client.mapping.MapUserNew p WHERE p.usrAbbrev=?/ > > /DEBUG [AWT-EventQueue-0] (//SqlBindParser.java:265) - Binding SQL > parameter value: ?1 = 'TH62XX', type: java.lang.String/ > > /DEBUG [AWT-EventQueue-0] (SQLEngine.java:2173) -! Executing the > following SQL: SELECT p.usrAbbrev FROM com.client.mappi ng.MapUserNew p > WHERE p.usrAbbrev=?/ > > /org.exolab.castor.jdo.PersistenceException//: Nested error: > java.sql.SQLException//: ORA-00933: SQL command not proper!
ly ended/ > > /while executing SELECT p.usrAbbrev FROM com.client.mapping.MapUserNew p > WHERE p.usrAbbrev=?: ORA-00933: SQL command not properly ended/ > > > > Any help would be greatly appreciated. > > > > Manuel Castrillon > > > > Verschicken Sie romantische, coole und witzige Bilder per SMS! > Jetzt bei WEB.DE FreeMail: *http://f.web.de/?mc=021193*&nb! sp; >
------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address:
[EMAIL PROTECTED] -------------------------------------------------
|
|
- Re: [castor-user] pass-through CALL SQL - Error Manuel Castrillon
-