日期:2014-05-17  浏览次数:20817 次

将数据类型 varchar 转换为 numeric 时出错 怎么解决 急急急
<%sql= "Select   top   1   *   From   ce_rank   where   PostingCountMin <= ' "&jifen+SiteSettings( "integralreg ")& " 'order   by   PostingCountMin   Desc "
            Set   UserRank=Conn.Execute(sql)
            if   UserRank.eof   then
            RankName= "未知等级 "
            RankIconUrl= "images/level/MemberCode0.gif "
            else
            RankName=UserRank( "RankName ")
            RankIconUrl=UserRank( "RankIconUrl ")
            end   if
            Set   UserRank   =   Nothing   %>


------解决方案--------------------
order前面有个空格,加上一个空格

如果不行的话,索性把sql打印出来看看
sql= "Select top 1 * From ce_rank where PostingCountMin <= "&jifen+SiteSettings( "integralreg ")& " order by PostingCountMin Desc "
Response.write sql
Response.end