如何用asp读出sql数据库中的 ntext字段???

Gide 2002-06-02 04:23:00
我有个段asp程序,想使用sql的 ntext字段具体怎么写啊???
...全文
40 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
Gide 2002-06-10
  • 打赏
  • 举报
回复
不是image,是存取新闻的内容!!很长的
julyclyde 2002-06-05
  • 打赏
  • 举报
回复
ntext不是image吧?你说的好像都是image字段
chulian 2002-06-05
  • 打赏
  • 举报
回复
我以前也遇到过,解决办法是把那个字段单独处理,也就是用另一
个rs去取这个字段。方法笨了些,可能会有更好的方法,有人说这种字
段必须最先输出,但不知道为什么。
Gide 2002-06-05
  • 打赏
  • 举报
回复
不是的,还是咱们不会,什么bug!!!!胡说
jsidiot 2002-06-04
  • 打赏
  • 举报
回复
这个是sql的一个bug
jsidiot 2002-06-04
  • 打赏
  • 举报
回复
有过这种情况的
你试试这样
<%=rs("字段")%>
Gide 2002-06-04
  • 打赏
  • 举报
回复
没人遇到过这种情况吗???
Gide 2002-06-03
  • 打赏
  • 举报
回复
????????????
Gide 2002-06-02
  • 打赏
  • 举报
回复
好象不是css的事
<!--#include file="conn.asp"-->

<%newsid=Request.QueryString("id")
'Response.Write newsid
sqlstr="SELECT * FROM news where id="&newsid'&"'"biaoti,zhaizi,neirong,img,counter,shijian
'Response.Write sqlstr
%>
<%
sqlstr2="update news set counter=counter+1"
set rs2=conn.execute(sqlstr2)

set rs1=conn.execute(sqlstr)

%>
<HTML>
<HEAD>
<style type="text/css">

TABLE { FONT-SIZE: 9pt }
INPUT { FONT-SIZE: 9pt }
SELECT{ FONT-SIZE: 9pt }
BODY { FONT-SIZE: 9pt }
a:link { color: #000099; text-decoration: none}
a:visited { color:#000099; text-decoration: none}
a:hover { color: #990000; text-decoration: underline}
td {font-size:9pt;line-height:13pt;}
.p1 { font-family: "宋体"; font-size: 9pt}
.p2 { }
.p3 { font-family: "宋体"; font-size: 12pt}

</style>
</HEAD>
<BODY>


<div align="center" class="p2"><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">新闻浏览</div></td>
</tr>
<tr><td> </td>
</tr>
</table>
<table width="500" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
<tr>
<td background="mmto.gif" height="15" width="470">
<table width="500" border="0" cellspacing="0" cellpadding="0" background="mmto.gif">
<tr>
<td background="mmto.gif"> </td>
<td background="mmto.gif">
<div align="right">
<img src="printer.gif" width="16" height="14">
<a href="javascript:window.print()">打印本页</a>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="470">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<%do while not(rs1.eof or rs1.bof) %><tr align="center">
<td class="p3"><br> <%=rs1("biaoti")%></td>
</tr>
<tr align="center">
<td> <div> <hr size="1" width="300">
<font color="#999999">[<%=rs1("shijian")%>]</font><br>
</div>
</td>
</tr>
<tr>
<td>
<%
if rs1("img")<> "" then
Response.Write "<img src="&rs1("img")&" border=0 align='left' width='20' height='200'>"
end if
nr=rs1("neirong")

%><br> <%Response.Write rs1("neirong")%>
</td>
</tr>
<tr>
<td> <br>
<br> 发布人: <%=rs1("zhaizi")%>
<br>
</td>
</tr>
<tr>
<td>
<div align="right"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="17">
<table width="498" border="0" cellspacing="0" cellpadding="0" background="mmto.gif">
<tr>
<td width="172" background="mmto.gif">本条消息被浏览了
<font color="#FF3333">[<%=rs1("counter")%>]</font>回
</td>
<td width="172" background="mmto.gif">
</td>
<td width="134" background="mmto.gif">
<p align="right"><a href="javascript:window.close()">关闭本窗口 </a></p>
</td>
</tr>
</table>
</td>
</tr><%
rs1.movenext
loop
rs1.close
set conn=nothing
%>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="bian.gif" width="500" height="13"></td>
</tr>
</table>
</div>
</BODY>
</HTML>
julyclyde 2002-06-02
  • 打赏
  • 举报
回复
ntext是Unicode的吧?
lanying 2002-06-02
  • 打赏
  • 举报
回复
看看网页源代码,是不是还有别的原因?
paodiaole 2002-06-02
  • 打赏
  • 举报
回复
不会啊,和其他字段读取一样的,我这里没问题的。
将CSS去掉试试。
Gide 2002-06-02
  • 打赏
  • 举报
回复
这不是一样吗,试了还是不行!!!
popcode 2002-06-02
  • 打赏
  • 举报
回复
你response.write rs1("neirong"),看看能不能显示内容
Gide 2002-06-02
  • 打赏
  • 举报
回复
.......
sqlstr="SELECT * FROM news where id="&newsid
set rs1=conn.execute(sqlstr)
........
<%do while not(rs1.eof or rs1.bof) %><tr align="center">
<td class="p3"><br> <%=rs1("biaoti")%></td>
.................
<%=rs1("neirong")%>

别的字段都能读出来,就这个不中!!
popcode 2002-06-02
  • 打赏
  • 举报
回复
你怎么读的?代码看看
Gide 2002-06-02
  • 打赏
  • 举报
回复
就是我的系统是新闻发布系统,新闻内容采用ntext类型,现在我能写入但是不能读出来,我该怎么办啊.
popcode 2002-06-02
  • 打赏
  • 举报
回复
什么意思啊?说清楚点
popcode 2002-06-02
  • 打赏
  • 举报
回复
什么意思啊?说清楚点

28,391

社区成员

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

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