请问一个ASP的问题

来源:百度知道 编辑:UC知道 时间:2024/05/31 02:41:05
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--#include file="conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>首页</title>
</head>

<body>

<p>
<a href="say.asp">发表帖子</a>
<br>
<table width=80% cellspacing=1 cellpadding=0 bgcolor=#000000 border="0" align="center">
<tr>
<td width=10% bgcolor="#FFFFFF&qu

把showbbs=conn.execute("select*from index order by id desc") 做如下改动:
set showbbs=server.createobject("adodb.recordset")
sql="select*from index order by id desc"
showbbs.open sql,conn,1,1

--------------------------------------
新的回复:
经过仔细查看,你原来的set showbbs=conn.execute("select*from index order by id desc") 里,*号左右没空格,不知道原程序里怎样。另外,表名index在这里要用中括号括起来,也就是:
set showbbs=conn.execute("select * from [index] order by id desc")

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">