为什么显示不出来!!

lanren007 2004-02-24 11:21:35
我刚开始写ASP程序,现有如下的ASP文件,编译时显示不出来?

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body>
<%
dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("mynews.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" '连接一个access的数据库
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
%>
<%
const MaxPerPage=10 '定义一个常量 maxperpage

dim i
dim sql
dim rs
dim typeid

i=0

%>
<%
sql="select * from article where typeid='16' "
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1


do while NOT rs.EOF
response.write( rs("title"))
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
set rs=nothing
set conn=nothing
%>


</body>

</html>
...全文
42 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧