我想在按钮上从一个 .asp 页面打开另一个 .asp 页面,单击下面是我已经完成的代码,但错误即将到来
错误是“对象关闭时不允许操作”
这是代码
Dim dbconn, objCmd, objParam, rs, EmailID, Password, connString, RecordCount
connString = "Connectionstring"
dbconn = Server.CreateObject("ADODB.Connection")
dbconn.Open(connString)
rs = Server.CreateObject("ADODB.RecordSet")
objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = dbconn
objCmd.CommandText = "sp_Name"
objCmd.CommandType = &H0004
objParam = objCmd.CreateParameter("@EmailID",200,1,"100",Session("EmailID"))
objCmd.Parameters.Append(objParam)
objParam = objCmd.CreateParameter("@Password",200,1,"100",Session("Password"))
objCmd.Parameters.Append(objParam)
rs = objCmd.Execute(Session("EmailID"),Session("Password"))
do while not rs.eof ------->here comes error
EmailID = rs(0)
Password = rs(1)
'response.Write EmailID & "," & Password & "<br">
rs.MoveNext
loop