[求助]函数需要字符串输入
我运行一个程序时提示“Cookies 对象, ASP 0102 (0x80004005)函数需要字符串输入”,这是什么原因??代码如下:
<!--#include file="adovbs.inc" -->
<%
session("Name")=trim(request.form("UserName"))
session("PW")=trim(request.form("PassWord"))
DbPath = SERVER.MapPath("guestbook.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
set rs=server.createobject("adodb.recordset")
Sql="Select * from user where username='"&session("Name")&"' And password='"&session("PW")&"'"
rs.open Sql,conn,adopenkeyset,adlockoptimistic,adcmdtext
'set rs=conn.execute(Sql)
'response.write rs.recordCount
if rs.RecordCount<=0 then
response.redirect "UserLogin.asp"
else
session("username")=session("Name")
Select Case Request.Form("CookieDate")
Case 1
Response.Cookies(CookieDate).Expires=Date+1
Case 2
Response.Cookies(CookieDate).Expires=Date+31
Case 3
Response.Cookies(CookieDate).Expires=Date+365
End Select
response.redirect "manger.asp"
end if
%>