zoukankan      html  css  js  c++  java
  • java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

    --- The error occurred in sqlMap/adInfo.xml. 
    --- The error occurred while applying a parameter map. 
    --- Check the insertAdInfo-InlineParameterMap. 
    --- Check the parameter mapping for the 'clicks' property. 
    --- Cause: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
    Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
        at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:91)
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:442)

    查了很久,才发现写了一个很傻的sql  {   }   ..............唉

    <!-- 录入广告统计信息 -->
    <insert id="insertAdInfo" parameterClass="com.tq365.vo.AdInfo">
    insert into
    ad_info(
    clicks,
    impressions,
    clicksRate,
    costPerClick,
    cost,
    averagePosition,
    conversions,
    costMConversions,
    conversionsRate,
    googleAdId,
    insertTime
    )values{
    #clicks#,
    #impressions#,
    #clicksRate#,
    #costPerClick#,
    #cost#,
    #averagePosition#,
    #conversions#,
    #costMConversions#,
    #conversionsRate#,
    #googleAdId#,
    #insertTime#
    }
    </insert>

     

     


  • 相关阅读:
    RTP/RTSP编程
    makefile
    VS 2010内存泄漏检测
    Linux Shell中捕获CTRL+C
    const
    Hdu 5344
    Hdu5762
    CF1200C
    CF1200B
    CF1200A
  • 原文地址:https://www.cnblogs.com/archie2010/p/1909241.html
Copyright © 2011-2022 走看看