ailong2006 发布留言 2008-11-20 14:25
求助:请大家帮我看看asp登陆跳转问题
我的index.asp页通过浏览器直接打开就可以正常查询,但通过登陆界面跳转到index.asp,点查询就会出现对象无法打开的错,好头疼,代码如下,请高手救我~!!!用户名密码核对页checkadmin:
<%
dim admin_name,admin_pwd
admin_name=trim(request("admin_name"))
admin_pwd=trim(request("admin_pwd"))
Set rs = Session("objRS")
rs.Source= "select * from admin where admin_name = '"&admin_name&"'"
rs.open
if rs.eof then
Response.Write ""
Response.Write ""
else
if rs("admin_pwd") <> admin_pwd then
Response.Write ""
Response.Write ""
end if
session("admin_name")=admin_name
response.redirect "index.asp"
end if
rs.Close
Set rs = Nothing
%>
index.asp页
<%@ LANGUAGE="VBScript" %>
<%
if Session("admin")= " " then
response.redirect "admin.asp"
response.end
end if
%>
文档查询
文档查询系统
<%
If Request("gjz") <> "" Then
Set objRS = Session("objRS")
objRS.Source = "SELECT * FROM file WHERE name & leibie LIKE '%" &Request("gjz")& "%' order by id desc"
objRS.Open
If objRS.RecordCount > 0 then
Response.write ( objRS("leibie")&objRS("niandai")& objRS("num"))
objRS.MoveNext
Loop
Else
Response.Write("没有找到!")
End If
' 注释:断开数据库连接
objRS.Close ' 关闭记录集
Set objRS = Nothing
End If
%>
查询输入关键字错误如下
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
ADODB.Recordset 错误 '800a0e79'
对象打开时,操作不被允许。
/filesearch/index.asp,行68
行68 就是:objRS.Source = "SELECT * FROM file WHERE name & leibie LIKE '%" &Request("gjz")& "%' order by id desc"
页: [1]