Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 20967 invoked from network); 13 Jul 2005 19:50:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2005 19:50:44 -0000 Received: (qmail 12707 invoked by uid 500); 13 Jul 2005 19:50:43 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 12501 invoked by uid 500); 13 Jul 2005 19:50:42 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 12488 invoked by uid 99); 13 Jul 2005 19:50:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2005 12:50:42 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of larry.meadors@gmail.com designates 64.233.162.205 as permitted sender) Received: from [64.233.162.205] (HELO zproxy.gmail.com) (64.233.162.205) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2005 12:50:39 -0700 Received: by zproxy.gmail.com with SMTP id o1so148647nzf for ; Wed, 13 Jul 2005 12:50:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nP9eKFDUj3vEB2NJ6y/gWdKmiUPk+8Q5C7WiWQypBZVU4qgjZ7O6M98J3aY2suwjs1pxJ29gJjDVW6+fh4rzeat77mGLOaJVOBbNo/OJmCVkMdlo/NJUcbPzjcL0iS+ilopQLr6+Ub/pL03taxlSTrWHvCxz3w7xi04UnKkHTIY= Received: by 10.36.224.54 with SMTP id w54mr1061030nzg; Wed, 13 Jul 2005 12:50:40 -0700 (PDT) Received: by 10.36.90.14 with HTTP; Wed, 13 Jul 2005 12:50:40 -0700 (PDT) Message-ID: Date: Wed, 13 Jul 2005 13:50:40 -0600 From: Larry Meadors Reply-To: lmeadors@apache.org To: user-java@ibatis.apache.org Subject: Re: multiple delete in sqlmap In-Reply-To: <42D5376C.3080106@univ-nancy2.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42D5376C.3080106@univ-nancy2.fr> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N did you try to do this through JDBC? Larry On 7/13/05, olivier ZILLER wrote: > hello, >=20 > i'm using sqlmap and mysql and try to execute a delete statement like thi= s : >=20 > > parameterClass=3D"fr.unire.portal.channels.fun.csof.beans.Objet" = > > delete from FUN_ERR_OBJ where NUM_OBJ =3D #numObj#; > delete from FUN_INFO_OBJ_LOV where NUM_OBJ =3D #numObj#; > delete from FUN_INFO_OBJ where NUM_OBJ =3D #numObj#; > delete from FUN_GRP_INFO_OBJ where NUM_OBJ =3D #numObj#; > delete from FUN_LANG_OBJ where NUM_OBJ =3D #numObj#; > delete from FUN_ARB_OBJ where NUM_FILS_OBJ =3D #numObj#; > delete from FUN_CDM_OBJ where NUM_OBJ =3D #numObj#; > delete from FUN_PERS_OBJ where NUM_OBJ =3D #numObj#; > delete from FUN_OBJET where NUM_OBJ =3D #numObj#; > >=20 > but i get this error : >=20 > --- 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 > =3D 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 > =3D 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(SqlMapExecuto= rDelegate.java:500) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.delete(SqlMapExecuto= rDelegate.java:523) > at > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.delete(SqlMapSessionImpl.= java:93) > at > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.delete(SqlMapClientImpl.ja= va: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 > =3D 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:13= 71) > at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI= mpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > com.ibatis.common.jdbc.logging.PreparedStatementLogProxy.invoke(PreparedS= tatementLogProxy.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.sqlExecuteUpd= ate(GeneralStatement.java:196) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate= (GeneralStatement.java:74) > ... 23 more >=20 > any idea on how to do that? >=20 > regards >=20 >=20 > -- > 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 >