建木传奇:至少一个参数没有被指定值,sql语句没有错误

来源:百度文库 编辑:中科新闻网 时间:2024/05/09 07:49:30
function thenext
rs=server.CreateObject("adodb.recordset")
sql="select top 1 * from article_info where unid<"&a1&" order by unid"
set rs=conn.execute(sql)
if rs.eof then
response.Write("没有了")
else
a2=rs("unid")
response.Write("<a href='shownews.asp?id="&a2&"'>下一篇</a>")
end if
end function
a1 是传过来了

sql最前面加一句
a1="0"+a1
确保a1不为空值,而最前面的0对数值不会有影响。

是不是 应该是
set rs=server.CreateObject("adodb.recordset")
啊 要不你发个全点的代码上来吧 好象没什么问题看着

set rs=conn.execute(sql)
换成
RS。OPEN CONN 3,1看看

连接字符窜没有指定