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>

 

 

 

 


posted on 2010-12-17 14:27  archie2010  阅读(7505)  评论(0编辑  收藏  举报