ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tite Etoundi <etoundia...@yahoo.fr>
Subject efficient management of comma in dynamic statement
Date Wed, 29 Nov 2006 22:09:18 GMT
  Plz do anybody could help me how can I manage comma in statement as the follow:
   <update id="UpdateProduct" parameterClass="ProduitVOType" >
            <isGreaterEqual property="IdCategory" compareValue="0">
              idCat = #IdCategory#
            <isNotNull property="CaractTechniques" prepend=",">
              caracteristiquesTech = #CaractTechniques#
            <isNotEmpty property="DescriptionDetaillee" prepend=",">
                descDetaillee = #DescriptionDetaillee#
            <isNotEmpty property="ImageBasePath" prepend=",">
              imageBasePath = #ImageBasePath#
              <isNotEmpty property="NomProduit" prepend=",">
              name = #NomProduit#
              <isGreaterEqual property="QteEnStock" compareValue="0" prepend=",">
              qteEnStock = #QteEnStock#
      WHERE idProduit = #IdProduit#
  For example when QteEnStock = -1 or IdCategory = -1, I get the following exception {"Line
1: Incorrect syntax near ','."}
  There could be a lot of cases as this one in this statement.
  Could somebody help me?

Etoundi Aboa Tite E.
Ingénieur Polytechnicien
Maître ès Science Informatique
 Concepteur de Solutions Mobiles
 Développeur d'applications SimToolKit
Tel: 935 60 14
 Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
View raw message