ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olivier ZILLER <Olivier.Zil...@univ-nancy2.fr>
Subject Re: multiple delete in sqlmap
Date Fri, 15 Jul 2005 13:49:57 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
you're right : it doesn't works...<br>
it seems i'll have to create mutliple delete statements...<br>
<br>
thanks<br>
<br>
Larry Meadors a &eacute;crit&nbsp;:
<blockquote cite="mida10a823c05071312504f11d805@mail.gmail.com"
 type="cite">
  <pre wrap="">did you try to do this through JDBC?

Larry


On 7/13/05, olivier ZILLER <a class="moz-txt-link-rfc2396E" href="mailto:Olivier.Ziller@univ-nancy2.fr">&lt;Olivier.Ziller@univ-nancy2.fr&gt;</a>
wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">hello,

i'm using sqlmap and mysql and try to execute a delete statement like this :

    &lt;!-- Suppression d'un objet --&gt;
    &lt;delete id="deleteObjet"
        parameterClass="fr.unire.portal.channels.fun.csof.beans.Objet" &gt;
        delete from FUN_ERR_OBJ where NUM_OBJ = #numObj#;
        delete from FUN_INFO_OBJ_LOV where NUM_OBJ = #numObj#;
        delete from FUN_INFO_OBJ where NUM_OBJ = #numObj#;
        delete from FUN_GRP_INFO_OBJ where NUM_OBJ = #numObj#;
        delete from FUN_LANG_OBJ where NUM_OBJ = #numObj#;
        delete from FUN_ARB_OBJ where NUM_FILS_OBJ = #numObj#;
        delete from FUN_CDM_OBJ where NUM_OBJ = #numObj#;
        delete from FUN_PERS_OBJ where NUM_OBJ = #numObj#;
        delete from FUN_OBJET where NUM_OBJ = #numObj#;
    &lt;/delete&gt;

but i get this error :

--- The error occurred in
/properties/channels/fr_unire/csof/sql-objet.xml.
--- The error occurred while applying a parameter map.
--- Check the deleteObjet-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: Syntax error or access violation
message from server: "You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ';         delete from FUN_INFO_OBJ_LOV where NUM_OBJ
= 23;         delete from F' at line 1"
Caused by: java.sql.SQLException: Syntax error or access violation
message from server: "You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ';         delete from FUN_INFO_OBJ_LOV where NUM_OBJ
= 23;         delete from F' at line 1"
    at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:87)
    at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:500)
    at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecutorDelegate.java:523)
    at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.java:93)
    at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.java:65)
    at
fr.unire.portal.channels.fun.csof.dao.ObjetDAO.deleteObjet(ObjetDAO.java:481)
    ... 18 more
Caused by: java.sql.SQLException: Syntax error or access violation
message from server: "You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ';         delete from FUN_INFO_OBJ_LOV where NUM_OBJ
= 23;         delete from F' at line 1"
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2247)
    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1371)
    at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedStatementLogProxy.java:57)
    at $Proxy2.execute(Unknown Source)
    at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:84)
    at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:196)
    at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:74)
    ... 23 more

any idea on how to do that?

regards


--
Olivier ZILLER
CRI Gestion
Universite NANCY2
25 rue Baron Louis
BP 454 NANCY CEDEX
tel: 03 54 00 11 12 / 06 85 74 89 77 / poste 604
fax : 03 83 30 05 65

    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Olivier ZILLER
CRI Gestion
Universite NANCY2
25 rue Baron Louis
BP 454 NANCY CEDEX
tel: 03 54 00 11 12 / 06 85 74 89 77 / poste 604
fax : 03 83 30 05 65</pre>
</body>
</html>

Mime
View raw message