如何从库中读出一篇文章的前面几十个字?(在线等待)

如何从库中读出一篇文章的前面几十个字?
我想用ASP读出存在库中一篇文章的前面几十个字,不知如何实现?
我用```

set Rs48=server.CreateObject ("ADODB.Recordset")
sql48 = "select top 1 * from article where Nclassid=48 order by Ntime DESC"
Rs48.Open sql48, strconn,3,1

1      

=left(Cstr(Rs48("content")),60)

 1但报错。   
 2\---------------------------------------------------------------   
 3  
 4文章是中文还是英文?在库中是用什么字段储存的(文本/二进制)??   
 5sql48="select content from article where Nclassid=48"   
 6Rs48.open sql48,strconn,1,1   
 7然后再决定用什么转换函数。   
 8\---------------------------------------------------------------   
 9  
10先将文章副个一个变量,因为left函数不能处理动态变化的数据(应该说表达不正确)   
11所以;   
12content=Rs48("content")   
13response.write left(content,60)
Published At
Categories with Web编程
comments powered by Disqus