ASP语言问题!谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/27 04:54:59
set rstop=conn.Execute("select * from book where istop=1 order by bookdate desc")
这句语言有错吗?
运行时提示
错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
/daima/book_list.asp, 第 23 行
完整点!这是一段ASP!!!我头都痛了.麻烦各位帮忙看下!
<%
dim sql
dim rs
dim rstop
dim page_size
dim top_count
page_size=5
top_count=0
set rstop=conn.Execute("select * from book where istop=1 order by bookdate desc")
do while not rstop.eof
%>

conn.Execute("select * from book where istop=1 order by bookdate desc")
去掉set rstop=
而且你的SQL 语句对数据库没有任何操作啊,只是读取置顶文章的第一条记录。

数据库连接有问题,看你用什么数据库了,书access还是sql,选择从book表,条件是istop=1,按bookdate 降顺序排列,你sql语言每错,看看你数据库连的对吗,你用dm开发网站?

看看bookdate是不是和你数据库里面的字段名一样