ASP与SQL联接的问题-------高手哪儿去了?

maths_lcy 2001-03-28 12:34:00
各位高手,我有这样一个问题,当我在使用访问MsSQL时,我的表字段类型是text或ntext时,使用ASP中的ADO测无法读取其字段的值,而写入则可以。
下面是读取程序,谁指导:
<%
dim Mes_id
Mes_id=request.QueryString("ID")
Set conn=Server.CreateObject("ADODB.connection")
Conn.Open ("dsn=LocalServer;uid=mes;pwd=mes")
sql="select * from table01 where id="&Mes_id
Set RS=Conn.execute(sql)
response.write("<p>主题:<font class=mQ>"&RS("subject")&"</font></p>")
response.write("<p>处室:<font class=mQ>"&RS("department")&"</font></p>")
response.write("<p>时间:<font class=mQ>"&formatdatetime(RS("date_time"),1)&formatdatetime(RS("date_time"),3)&"</font></p>")
response.write("<p>内容:<font class=mq><pre><br>")
response.write(RS("content"))
response.write("</br></pre></font>")
%>
在response.write(RS("content"))这句中出错,content字段在SQL中定义是text类型
...全文
121 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
maths_lcy 2001-04-23
  • 打赏
  • 举报
回复
谢谢!
superlink 2001-03-31
  • 打赏
  • 举报
回复
我也碰到过类似问题,
text 和 ntext 类型的需要单独再作一次查询,
就会没有问题的。

28,406

社区成员

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

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