+ -
当前位置:首页 → 问答吧 → 错误类型:Request 对象, ASP 0102 (0x80004005)函数需要字符串入。/message/line.asp, 第 2 行

错误类型: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")

作者: hefeng_aspnet   发布时间: 2011-11-14

cn 是变量吗? 是变量的话有没有值?

作者: hookee   发布时间: 2011-11-14