<% '查询结果.asp程序
Const Head="查询结果"
MyPath = SERVER.MapPath("huayu.mdb")
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & MyPath
Set MyRS=Server.CreateObject("ADODB.RecordSet")
Sql="select * from 花语"
MyRS.open SQL,MyConn,1,1
Mynub=request.form("txtN")
MyVal=request.form("txtVal")
if mynub=1 then
MySQL="select * from 花语 where name='"&MyVal&"'"
title="按花名查询的结果"
end if
'set MyRS1=Myconn.execute(MYSQL)
'建立查询集MyRS1
Set MyComm=Server.CreateObject("ADODB.Command")
Set Mycomm.ActiveConnection=MyConn
MyComm.CommandText=MySQL
set MyRS1=MyComm.Execute
%>
<HEAD><TITLE><%=Head%></TITLE></HEAD>
<BODY BACKGROUND="029.jpg">
<center><H2><font color=red><font face="华文中宋"><%=Title%></font></H2>
<%if MyRS1.eof then%>
<%response.write "没有要查的资料..."%>
<%else%>
<table><tr>
<td>花名</td>
<td>花语</td>
<% While Not MyRS.EOF %>
<tr>
<td><%=MyRS("花名")%></td>=
<td><%=MyRS("花语")%></td></tr><br>
<%MyRS1.MoveNext %>
<%Wend %>
</table>
<%end if
set MyRS1=nothing
%>
</BODY>
<!--#Include file="花卉世界1.asp"-->
一直无法显示~
无法显示网页
试图访问的网页出现问题,无法显示。
--------------------------------------------------------------------------------
请尝试执行下列操作:
单击刷新按钮,或稍后重试。
打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务
--------------------------------------------------------------------------------
技术信息(用于支持人员)
错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
/huA/花卉/070602434/查询结果1.asp, 第 26 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
网页:
GET /huA/花卉/070602434/查询结果1.asp
时间:
2007年12月9日, 下午 12:07:56
详细信息:
Microsoft 支持
谢谢啊,我改来改去还是不行,请再帮帮忙~
第26行
<%if MyRS1.eof then%>
<%response.write "没有要查的资料..."%>
<%else%>