ASP中备注字段无法显示,怎么办?急救!!

jsbinbin 2004-12-03 07:27:10
ACCESS数据库中备注字段无法显示,将此备注字段换成文本字段后可以正常显示,求助到底怎么回事?大家帮帮忙吧!多谢了~以下是代码~~~~


<%
dim ArticleID
ArticleID=trim(request("ArticleID"))
if ArticleId="" then
response.Redirect("Product.asp")
end if

sql="select * from Product where ArticleID=" & ArticleID & ""
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
response.write"<SCRIPT language=JavaScript>alert('Can not find this product!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
rs("Hits")=rs("Hits")+1
rs.update
if rs("hits")>=HitsOfHot then
rs("Hot")=True
rs.update
end if
BigClassName=rs("BigClassName")
SmallClassName=rs("SmallClassName")
%>

<%
if rs("content")<>"" then
response.write(rs("content"))
else
response.write("null")
end if
%>

执行后,页面什么都不显示。


求教了!
...全文
145 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
brinkmanyh 2004-12-03
  • 打赏
  • 举报
回复
rs.open sql,conn,1,3
if rs.bof and rs.eof then
这里有点问题,conn,1,3中间1的意思就是逐步往后检索,所以后面一句只要if rs.eof then

理解而已,不对可以拍砖,呵呵
纪俊 2004-12-03
  • 打赏
  • 举报
回复
你把content换为details实验下
好像content占用了系统的关键字
还有就是你的数据库表明有没有使用系统的关键字?
如果是请换一个
/////////////////////////////////////////////////////////////////////
欢迎大家使用编程文档手册V3.5,编程辅助类软件
下载:http://www.skycn.com/soft/11906.html
m1_1m 2004-12-03
  • 打赏
  • 举报
回复
你把你在网页中要输出的顺序写得和查找的顺序试试。
如sql="select a,b,c from tablenam"

set rs=conn.execute(sql)
if not rs.eof then
response.write rs("a")
response.write rs("b")
response.write rs("c")
end if
。。。。。
holoon 2004-12-03
  • 打赏
  • 举报
回复
你的表里有多少个字段就对应定义多少个变量,
然后把数据读出赋给变量
最后以变量来显示要显示的内容。
jsbinbin 2004-12-03
  • 打赏
  • 举报
回复
还是什么都不显示,说明content字段不为空。
jsbinbin 2004-12-03
  • 打赏
  • 举报
回复
还是不行!!
content字段肯定不空,但是就是不显示,换成文本字段,类似于vchar字段后就能显示。
真是见怪了!!
尚和空四 2004-12-03
  • 打赏
  • 举报
回复
if trim(rs("content")) <> "" then
尚和空四 2004-12-03
  • 打赏
  • 举报
回复
if rs.eof or rs.bof then
zzsdream 2004-12-03
  • 打赏
  • 举报
回复
<%
if not isnull(rs("content")) then
response.write(rs("content"))
else
response.write("null")
end if
%>

28,390

社区成员

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

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