What does this mean? What have I done?
What I am trying to do is create a directory style list of items where sub items are indented. Everytime this function gets called I get an "Out of Memory" error.
Working with recursion, this normally wouldn't surprise me but I got this error while testing the "add item" functionality. I had just added my first item. This function should not recurse more than two deep.
Thanks in advance.
---------------------------------------
Where would one begin to study Myology?
Code:
function ItemList(Indent, Parent)
dim rtrn
dim rs
dim sql
dim d
d = string(indent," ")
sql = "SELECT ItemNum,Name,size " & _
"FROM things " & _
"WHERE parent=" & parent
set rs = server.createobject("ADODB.Connection")
rs.open sql, Application("ConnectionString")
while(not rs.eof)
rtrn = rtrn & _
"<tr>" & vbcrlf & _
" <td>" & rs("Name") & "</td>" & vbcrlf & _
" <td>" & rs("size") & "</td>" & vbcrlf & _
"<tr>" & vbnewline
rtrn = rtrn & ItemList(indent+1,rs("ItemNum"))
rs.movenext
wend
rs.close
set rs = nothing
ItemList = rtrn
end function
Working with recursion, this normally wouldn't surprise me but I got this error while testing the "add item" functionality. I had just added my first item. This function should not recurse more than two deep.
Thanks in advance.
---------------------------------------
Where would one begin to study Myology?