回 帖 发 新 帖 刷新版面

主题:[讨论]ASP数据类型不对

If Application(CacheName&"_Setup")(0)<>"" Then
    If dataType="Access" Then
第 19 行----        Conn.Execute("Update [China_Data] Set [Money]=0 Where [Money]>0 And MoneyDate<'"&now()&"'") 
    Else
        Conn.Execute("Update [China_Data] Set [Money]=0 Where [Money]>0 And MoneyDate<getDate()")
    End If
Else
    If dataType="Access" Then
        Conn.Execute("Update [China_Data] Set [Money]=0 Where [Money]>0 And MoneyDate<Date()")
    Else
        Conn.Execute("Update [China_Data] Set [Money]=0 Where [Money]>0 And MoneyDate<now()")
    End If
    
    
    错误类型:
Microsoft JET Database Engine (0x80040E07)
标准表达式中数据类型不匹配。
/inc/head.asp, 第 19 行
粗体的就是第19行

回复列表 (共2个回复)

沙发


 Conn.Execute("Update [China_Data] Set [Money]=0 Where [Money]>0 And MoneyDate<[color=FF0000]'"&now()&"'[/color]")

改为:

 Conn.Execute("Update [China_Data] Set [Money]=0 Where [Money]>0 And MoneyDate<[color=0000FF]now()[/color]")

板凳

Conn.Execute("Update [China_Data] Set [Money]=0 Where [Money]>0 And MoneyDate<#"&now()&"#") 
试试这个

我来回复

您尚未登录,请登录后再回复。点此登录或注册