You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "supriya .pelluru" <su...@gmail.com> on 2008/04/30 11:45:40 UTC
Delete statements cannot be executed as a query
Hi to All
when i am executing the this delet query in ibatis
<delete id="delete the record from usetable" parameterClass="booksform">
delete FROM IBATISUSERBOOK where STATUS='Y' and REQUEST_STATUS='Y'
</delete>
i am getting this error
Delete statements cannot be executed as a query.
at
com.ibatis.sqlmap.engine.mapping.statement.DeleteStatement.executeQueryForObject(DeleteStatement.java:33)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)
at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
in action class code is
sqlMap.queryForObject("delete the record from usetable");
Re: Delete statements cannot be executed as a query
Posted by "supriya .pelluru" <su...@gmail.com>.
Hi
Thank you soooo much for u r help
On Wed, Apr 30, 2008 at 3:24 PM, Graeme J Sweeney <ib...@gjsweeney.com>
wrote:
> On Wed, 30 Apr 2008, supriya .pelluru wrote:
>
> i am getting this error
>> Delete statements cannot be executed as a query.
>> at
>>
>> com.ibatis.sqlmap.engine.mapping.statement.DeleteStatement.executeQueryForObject(DeleteStatement.java:33)
>>
>
> You're using queryForObject instead of delete.
>
> --
> Graeme -
>
Re: Delete statements cannot be executed as a query
Posted by Graeme J Sweeney <ib...@gjsweeney.com>.
On Wed, 30 Apr 2008, supriya .pelluru wrote:
> i am getting this error
> Delete statements cannot be executed as a query.
> at
> com.ibatis.sqlmap.engine.mapping.statement.DeleteStatement.executeQueryForObject(DeleteStatement.java:33)
You're using queryForObject instead of delete.
--
Graeme -