超时已过期的问题,希望帮帮我!
Microsoft OLE DB Provider for SQL Server 错误 '80040e31 '
超时已过期
receivemsg.asp,行 39
就是这句:conn.execute( "update ShortMessage set isnew=1 where id= "&rs( "id "))
代码如下:
'如果有新消息,则显示
sql= "select sm.*,(select mName From Members Where ID=sm.FromMemberID) FromMember, "&_
"(select mName From Members Where ID=sm.ToMemberID) ToMember FROM ShortMessage sm where isnew=0 "
sql = sql + " and sm.ToMemberID= "&userid
if tomemberid <> " " then
sql = sql + " and sm.FromMemberID= "&other
end if
sql = sql + " order by id asc "
set rs=conn.execute(sql)
if rs.eof then
else
do while not rs.eof
newmsg=newmsg & " <font color= '#0000ff '> "&rs( "FromMember ")& " </font> 在 <font color= '#ff0000 '> "&formatdatetime(rs( "addtime "),4)& " </font> 给你发的消息: <br> "& rs( "content ")
newmsgtime=rs( "addtime ")
busyid=rs( "busyid ")
conn.execute( "update ShortMessage set isnew=1 where id= "&rs( "id "))
rs.movenext
loop
end if
rs.close
set rs=nothing
------解决方案--------------------response.write rs( "id ") 看看有值没
------解决方案--------------------程序好像没有问题,应该是数据库设置问题。
你到网上找一下吧,关键字:超时已过期
------解决方案--------------------查错步骤
1.这句单独是否可以正常执行 conn.execute( "update ShortMessage set isnew=1 where id= "&rs( "id "))
2.sql = sql + " order by id asc "
set rs=conn.execute(sql)
输出这个sql,是否正确?看set rs=conn.execute(sql)是否可以正常执行
3. 看到底是哪个步骤执行超时