错误类型:Request 对象, ASP 0102 (0x80004005)函数需要字符串入。/message/line.asp, 第 2 行
时间:2011-11-14
来源:互联网
<%myconn.execute("delete from [website].[dbo].[online] where ltime<Getdate()-0.005")
lgname=Request.Cookies(cn)("lgname") //提示这行出错,我是将access数据库程序转换成sql server程序才出现这样的错误
ip=request.servervariables("remote_addr")
if lgname="" then
set jilu=myconn.execute("select ip from [website].[dbo].[online] where ip='"&ip&"'")
if jilu.eof then
set jilu=nothing
myconn.execute("insert into [website].[dbo].[online] (ip,ltime)VALUES('"&ip&"','"&Getdate&"')")
else
myconn.execute("update [website].[dbo].[online] set ltime='"&Getdate&"' where ip='"&ip&"'")
end if
end if
if lgname<>"" then
set ujilu=myconn.execute("select name from [website].[dbo].[online] where name='"&lgname&"'")
if ujilu.eof then
set ujilu=nothing
myconn.execute("delete * from [website].[dbo].[online] where ip='"&ip&"'")
myconn.execute("insert into [website].[dbo].[online] (name,ltime)VALUES('"&lgname&"','"&Getdate&"')")
else
myconn.execute("update [website].[dbo].[online] set ltime='"&Getdate&"' where name='"&Getdate&"'")
end if
end if
usno=myconn.execute("Select count(ltime)from [website].[dbo].[online] where name<>''")(0)
lineno=myconn.execute("Select count(ltime)from [website].[dbo].[online]")(0)
if lineno>mostonline then
myconn.execute("update [website].[dbo].[bbsinfo] set mostonline='"&lineno&"'")
mostonline=lineno
end if
nusno=lineno-usno
%>
作者: jacky_xu1980 发布时间: 2011-11-14
之前你的cookie是否存入值
lgname=Request.Cookies(cn)("lgname")
lgname=Request.Cookies(cn)("lgname")
作者: hefeng_aspnet 发布时间: 2011-11-14
cn 是变量吗? 是变量的话有没有值?
作者: hookee 发布时间: 2011-11-14
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28