高手帮我看看下面的程序(递归)出来啥问题
<%
function ShowBox(PID,LANG)
if (PID = "-1") then
response.Write "大类"
'exit function
end if
dim sql
set rs = server.CreateObject("adodb.recordset")
sql = "select PID ,name,lang from product where ID = " &PID &" and lang = '" &LANG& "'"
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then
do while not rs.eof
ShowBox rs("PID"),rs("Lang")
response.Write("-->")
response.Write(rs("name"))
rs.movenext
loop
end if
rs.close()
set rs=nothing
call CloseConn()
response.Write "END"
end function
%>
我想在上面的程序中递归读出数据库的数据,可是当该函数第二次被调用时(即递归进入第二层)就退出了,不知道怎么回事,各位高手指点一下