• 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>

     

     


  • 相关阅读:
    不装JDK环境运行项目jar包
    java 开发事务回滚
    navicat无法连接MySql; client does not support authentication....
    java url特殊字符报400
    修复windows **.dll缺失
    mysql5.7解压版安装
    IDEA破解
    java 通过request.getParameterMap()获取前台传入参数
    java 实现https请求
    java 实现Http请求
  • 原文地址:https://www.cnblogs.com/archie2010/p/1909241.html
Copyright © 2020-2023  润新知