Nested Recordset Problem

Results 1 to 2 of 2

Thread: Nested Recordset Problem

  1. #1
    Join Date
    Dec 1969

    Default Nested Recordset Problem

    Hi all, I am a newbie in ASP & ADO. Hope can get some help through this forum. Thanks in advance!<BR><BR>I am using ASP to connect to SQL recordset in my project. Basically I am mapping my server directory with my table as below: (so that I can keep record of this virtual directory for reuse in other application)<BR>id Level Folder/FileName Flag Parentid<BR>1 1 ABC 1 0<BR>2 2 DEF 1 1<BR>3 2 GHI 1 1<BR>4 3 JKL 1 2<BR>5 3 MNO 2 3<BR>6 4 PQR 2 4<BR>.<BR>.<BR>.<BR><BR>My program is as below:<BR><BR>sub LdChild(pid) &#039; calling this sub function with parentid<BR>Rs.Open xxxx &#039; some connection string<BR>Do While Not Rs.EOF<BR>If Rs("id") = pid Then<BR>If Rs("Flag") = 1 Then<BR>--- Do something ---<BR>call LdChild (Rs("id"))<BR>WriteFoot<BR>Else<BR>--- Do Something ---<BR>End If<BR>End If<BR>Rs.MoveNext<BR>Loop<BR>End sub<BR><BR>Because I am nestedly calling this function and the recordset has to be opened again when it enter the function, hence I got the error for the recordset.<BR><BR>Can anyone please help me out? Or any better suggestion of doing it? Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: Nested Recordset Problem had an exmple on how to do this.<BR><BR>Search for hierarchial records or something like that...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts