这段代码有错么,为什么不能预览

来源:百度知道 编辑:UC知道 时间:2024/09/25 09:29:54
我见了一个数据库tushu.mdb 里面有一个表格,名字是tushumingxi 。
我写了下面这段代码
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%Dim connstr
connstr="provider=microsoft.jet.oledb.4.0;data source="& server.mappath("tushu.mdb")
Set bb=server.CreateObject("adodb.connection")
bb.open connstr
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<meta http-equiv="content-language" content="zh-cn">
<meta http-equiv="content-type" content="text/html: charset=gb2312">
<TITLE> 查询列表 &l

Set rs=server.CreateObject("adodb.recordset")
rs.open"select*from tushumingxi",bb
%>
<%=rs("mc")%>
<%=rs("jg")%>
<%=rs("zz")%>

========================
这段不对吧.
Set rs=server.CreateObject("adodb.recordset")
sql="select * from tushumingxi"
rs.open sql,conn,1,1
'打开表
do while not rs.eof
'对表记录查找显示
<%=rs("mc")%>
<%=rs("jg")%>
<%=rs("zz")%>
response.write "<br>"
rs.movenext
'下一记录
loop
rs.close
set rs=nothing

你确定网站在运行了么。。