fso改adodb.stream问题
下面的代码是用fso生成,一切正常。现在我要改为adodb.stream来生成。
尝试了很久不成功,请教高手帮忙。谢谢。
Dim sql
sql="select Top 300 * from news order by id desc"
Dim rs
Dim PageCounts
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open Sql,conn,1,1
rs.pagesize=15
PageCounts=rs.pagecount
Dim fs
Dim folders
Dim Filestart
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Dim i
for i=1 to PageCounts
page=i
folders=server.mappath("../")
if i=1 then
Filestart=HtmlStartName
else
Filestart=HtmlStartName&i
end if
Dim files
Dim filez
files=Filestart&".html"
filez=folders&"\"&files
Dim ts
set ts = fs.createtextfile(filez,true)
ts.write("内容列表")
ts.close
set ts=nothing
Next