资讯   |   开发   |   选机中心   |   产品大全 | IBM | 惠普 | 联想 | 戴尔 | 苹果 | 神舟
更多: | 华硕 | 明基 | 方正 | 紫光 | TCL | 夏新 | 联宝 | 宏碁 | 七喜 | 长城 | 清华同方 | 海尔 | 三星 | 东芝 | 索尼 | 富士通 | LG | 技术 | ddnoon
当前位置:笔记本 > 软件开发 >
Advertisement
文章正文

简单的问题!从数据库中提取数据!

类型:转载   责任编辑:asp.net   日期:2007/05/23


热门软件下载:


   

小弟问题如下:  
  sql中表有一数据类型为ntext型的列  
  可是在asp中.用<%=rs("content")%>却什么都不显示!  
  请各位大哥指教!!  
  说明原因,应该如何提取显示??  
  另外,数据库中是有数据的.

网友回答:

发表者:newmcz

<%=rs("content")%>   应该是可以的,你看看你其他语句是不是有问题,  
  或者你<%=trim(rs("content"))%>试试.

发表者:eb5mj

原因可能有很多,把你的网页贴上来看看吧,这不是数据类型的事

发表者:lansheyuyan

<%  
          sql   ="select   *   from   liuyan   order   by   id   desc"  
  set   rs   =   myconn.execute(sql)  
  if   rs.eof   then  
  response.write   "暂无留言,敬请期待!"  
  else  
  do   while   not   rs.eof  
      %>  
  ---------------------------------------------------->>>  
  <%  
            set   rs=server.createobject("adodb.recordset")  
            sql   ="select   *   from   liuyan   order   by   id   desc"  
            rs.open   sql,myconn,1,3  
  if   rs.eof   and   rs.bof   then  
  response.write   "暂无留言,敬请期待!"  
  else  
  do   while   not   rs.eof  
      %>

发表者:777dragon

 
  长度?~~~

发表者:jinhong618

我运行了你的代码,没问题。唉!

发表者:yxhzj

<%if   len(trim(rs("content")))>30   then%><%=left(trim(rs("content"),29))%>..<%else%><%=trim(rs("content"))%><%end   if%>

发表者:bladeinside

你可以response.write   rs("content")的值看看


 

 
热门推荐笔记本: 七喜笔记本
相关文章:
webmaster:popbb@126.com   最佳浏览:1024X768 MSIE
©2007 popbb.net All Rights Reserved