castor can't cope with brackets in a CALL SQL.  we have hacked our castor
source to cope with it based on a message about this issue in the archives.

brad

-----Original Message-----
From: Sylvie RAMON [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 30 January 2002 9:57 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Castor JDO & CALL SQL


Hi,
I would like to execute sql command with castor.

I have a problem when i want to use the sql command 'to_char'.

The source is :
String l_sql = "CALL SQL SELECT to_char(umm.seq_abonne.nextval, '0999999')
from dual AS fr.cmc.umm.mapping.sequences.MDual";
Query oql = database.getOQLQuery(l_sql);
QueryResults l_results = oql.execute();
while (l_results.hasMoreElements()) {
        l_mDual = (MDual)l_results.next();
        l_sequence = l_mDual.getNextval();
}
oql.close();

The "getOQLQuery" command modify the command on "SQL SELECT to_char()" and
that's all. Nothing into and after ().


If I execute the next, it's ok:
String l_sql = "CALL SQL SELECT umm.seq_abonne.nextval from dual AS
fr.cmc.umm.mapping.sequences.MDual";

Someone has an idea ??

-----------------------------------------------------------
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

Reply via email to