you are doing wrong man.
this is to call stored procedures................................
GO TO http://castor.exolab.org/jdo.html#OQLQuery
The is also a special form of query that gives a possibility to call stored
procedures:
oql = db.getOQLQuery( "CALL sp_something($) AS myapp.Product" );
Here sp_something is a stored procedure returning one or more
ResultSets with the same sequence of fields as Castor-generated SELECT for
the OQL query "SELECT p FROM myapp.Product p" (for objects without relations
the sequence is: identity, then all other fields in the same order as in
mapping.xml).
-----Original Message-----
From: Edwin van Stam [mailto:[EMAIL PROTECTED]]
Sent: 16 May 2002 14:39
To: [EMAIL PROTECTED]
Subject: [castor-dev] Pass Thru SQL throws exception
Dear Castor developers,
I'm trying to retrieve one field from my table. I understand that I cannot
do that using plain OQL but need to write a SQL Pass Thru query. So I write:
> OQLQuery qry = db.getOQLQuery("CALL SQL SELECT firstName FROM T_USER");
But when executing I get the following exception:
> org.exolab.castor.jdo.QueryException: Stored procedure call must end with
"AS <class-name>"
When retrieving a complete row this is understandable, but I'm retrieving
one field only. Judged by other messages in this mailing list, other people
do not seem to have this problem.
Could anyone tell me what I am missing here?
Thanks,
Edwin van Stam
--
****************************************************************************
This message contains information that may be privileged or confidential and
is the property of the Cap Gemini Ernst & Young Group. It is only intended
for the person to whom it is addressed. If you are not the intended
recipient, you are not authorized to read, print, retain, copy disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.
****************************************************************************
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev