<% Dim cnn, rstArt, rstRe, sSQL, fso, fld, f, id, i, rstauser, rstruser Set cnn = Server.CreateObject("ADODB.Connection") Set rstArt = Server.CreateObject("ADODB.Recordset") Set rstRe = Server.CreateObject("ADODB.Recordset") set rstauser = server.createobject("adodb.recordset") set rstruser = server.createobject("adodb.recordset") Set fso = Server.CreateObject("Scripting.FileSystemObject") Set fld = fso.GetFolder(Server.MapPath("./Images/pic/")) id = Request.QueryString("id") ' 打开到test数据库的连接 cnn.Open "DSN=data;" ' 在所选主题的浏览次数上加1 sSQL = "UPDATE articles SET view_times=view_times+1 WHERE art_id=" & id cnn.Execute sSQL, , adCmdText ' 创建原创帖子的记录集 sSQL = "SELECT * FROM articles WHERE id=" & id Set rstArt = cnn.Execute(sSQL, , adCmdText) ' 创建回复帖子的记录集 a = rstart("author") ssql = "select * from user where username = " & a set rstauser = cnn.execute(ssql, , adcmdtext) sSQL = "SELECT * FROM replies WHERE art_id=" & id & " ORDER BY reply_time DESC" Set rstRe = cnn.Execute(sSQL, , adCmdText) b = rstre("author") ssql = "select * from user where username = " & b set rstruser = cnn.execute(ssql, , adcmdtext) %>
在这一行set rstauser = cnn.execute(ssql, , adcmdtext) 出错
参数不足,期待是 1。