Hello!!
When I do a batch delete using a pass through SQL, I get this exception on
db.commit
db.begin();
bOql = db.getOQLQuery("call sql delete from test_table where nid=$1 and
sid=$2 as objectname");
bOql.bind(NID);
bOql.bind(SID);
results = bOql.execute();
db.commit();
"Exception Only 0 fields in this query"
The SQL will not return any results because it is a delete
Any pointers would be very helpful.
With Regards
Dutta:)
-----Original Message-----
From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 6:10 PM
To: DUTTA,SATADIP (HP-FtCollins,ex1)
Subject: Re: [castor-dev] Pass through SQL Problem
This one time, at band camp, DUTTA,SATADIP (HP-FtCollins,ex1) said:
DH>Hello !!
DH>I need to write an pass through SQL statement that castor will directly
DH>execute
DH>
DH>Here is what I wrote and the exception I am getting is
DH>Persistence Layer:: Stored procedure call must end with "AS <class-name>"
Dutta,
I think that the example query on the web site
(http://castor.exolab.org/jdo-faq.html#OQL) for pass through SQL
ommitted the fact that AS <classname> is required. See the stored
procedure example at the end of this section:
http://castor.exolab.org/jdo.html#OQLQuery
DH>bOql = db.getOQLQuery("CALL SQL DELETE FROM TEST_TABLE WHERE NID=$1 AND
DH>SID=$2");
This would change the above query to be:
call sql delete from test_table where nid=$1 and sid=$2
as com.hp.inca.persistenceLayer.Tablemapping.objectname
Bruce
--
perl -e 'print
unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev