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

高人指点(sql Server 的修改)
str= "select   *   from   tbbs   where   fbbsid= ' "   &   strfrepid& " ' "
set   rs=server.createobject( "adodb.recordset ")
rs.open   str,conn,1,1
if   not   rs.eof   then
response.Write(rs(0))
mysql= "update   tbbs   set   fhuifu= ' "&rs( "fhuifu ")+1& " ',flasttime= ' "+now()+ " '   where   fbbsid= ' "&strrepid& " ' "
conn.execute   mysql
else
response.Write( "空 ")
end   if

IE提示错误
Microsoft   VBScript   运行时错误   (0x800A000D)
类型不匹配:   '[string:   " ',flasttime= ' "] '
/by1/hftijiao.asp,   第   27   行


flasttime   类弄为datetime     varchar   都试过   不行的


------解决方案--------------------
fhuifu, rs( "fhuifu ")是数字的话:
mysql= "update tbbs set fhuifu= " & CStr(rs( "fhuifu ").Value+1) & ", flasttime= ' "+now()+ " ' where fbbsid= ' " & strrepid & " ' "
------解决方案--------------------
mysql= "update tbbs set fhuifu= ' "&(clng(rs( "fhuifu "))+1)& " ',flasttime= ' "& now & " ' where fbbsid= ' "& strrepid & " ' "