类型不匹配: tempaddtime
set rs=server.createobject("adodb.recordset")
sql="select NewsID,UpdateTime,smallclassid from news where NewsID=" & NewsID
rs.open sql,conn,1,3
smallclassidnw=rs("smallclassid")
tempaddtime=rs("UpdateTime") 'UpdateTime是时间类型
rs.close
set rs=server.createobject("adodb.recordset")
sql="select * from news where NewsID="&NewsID
rs.open sql,conn,3,3
rs("fpath")=cstr(year(tempaddtime)) &"-" & cstr(month(tempaddtime)) 'fpath是文本类型
rs.update
数据库是access,如果把tempaddtime用now()代的话,就不会出现类型不匹配: tempaddtime这样的错误,不知道是怎么一回事