看一下这个函数有什么错误
Function CreateArticle(Article_Name)Set rs=server.createobject("Adodb.recordset")
sql="select top 5 * from Article where typename=Article_Name order by dateandtime desc"
rs.open sql,conn,1,1
if rs.eof then
str=str&"<font color=red>暂时没有任何内容</font>"
else
str=str& "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
i=1
do while not rs.eof
str=str &"<tr><td width='4%'><img src='lin2/img/dot.gif' width='11' height='11'>"
str=str&"</td><td width='96%'><a href="&rs("path")&"/"&rs("N_Fname")&">"
str=str& ""&ChkTitle(rs("title"))&"</a>("&rs("dateandtime")&")"
str=str&"</td></tr>"
i=i+1
if i>5 then exit do
rs.movenext
loop
str=str&"</table>"
rs.close
Set rs=nothing
end if
CreateArticle=str
End Function
pencat=replace(pencat,"$WordNew$",CreateArticle("工作动态"))
老是替不了
[此贴子已经被作者于2005-12-29 15:26:40编辑过]