Below is a recursive function I have for a message board. Essentially before I call this function, I have a SQL statement that retrieves an RS where the thread is -1(parent messages) I get the ID of this parent and then call getReply passing in the ID as replies to this message will have the parent ID as its thread. This function is recursive so I get replies to replies and so on. I am just wondering if this is the most efficient way was I am constantly querying the DB? I have not fully finished the function but this is the bones, don&#039;t worry if there is something that looks stupid, it probably is, I just want to know if there is a better way than constantly querying the DB???<BR><BR>Thanks in advance<BR><BR>function getReply(intThread)<BR>dim objRSRep, strSQLRep<BR><BR>&#039;Response.Write intThread<BR><BR>strSQLRep = "SELECT * from MessageBoard WHERE THREAD = " + CStr(intThread)<BR><BR>&#039;Response.Write strSQLRep<BR><BR>set objRSRep = Server.CreateObject("ADODB.Recordset")<BR><BR>objR SRep.Open strSQLRep,objConn,adOpenForwardOnly<BR><BR>if not objRSRep.BOF then<BR> do while not objRSRep.EOF<BR> intCnt = intCnt + 1<BR> <BR> Response.Write "the message in question" <BR> <BR> if not objRSRep.EOF then<BR> getReply(objRSRep("ID"))<BR> end if<BR> <BR> objRSRep.MoveNext<BR> loop<BR>end if <BR>&#039;objRSRep = Nothing <BR>end function