ADO resultset not showing -- please help!!

Results 1 to 2 of 2

Thread: ADO resultset not showing -- please help!!

  1. #1
    Manpreet Guest

    Default ADO resultset not showing -- please help!!

    i am writing a small messageboard and am using the following code which is pretty self explanatory. <BR><BR>The problem is that i can loop thro the forst record set(outer one) buit i cannot thro the inner one(answers) .the output of the inner loop doenot show up although there are database entries . The outer loop completes easily.<BR><BR>the following is my code <BR><BR>Set qrs = conn.execute("select Question_Id,Question_Submitter,Question_Subject from Questions where Question_date &#062;= " & CDate(prev) &" ")<BR><BR>if qrs.EOF Then<BR>%&#062;<BR>No Questions Posted.<BR>&#060;%<BR>Else<BR>Do while not qrs.eof<BR>%&#062;<BR>-- &#060;a href="viewques.asp?qid=&#060;%=qrs(0)%&#062;"&#062 ;&#060;%=qrs(2)%&#062;&#060;/a&#062; -- (&#060;%=qrs(1)%&#062;)<BR><BR>&#060;%<BR>set ansrs = conn.execute("select answer_id,answer_submitter,answer_subject from answers where question_id = " & qrs(0) & "")<BR>if ansrs.eof Then<BR>&#039do nothin<BR>Else<BR> Do while ansrs.eof<BR> Response.write "-- &#060;a href=viewans.asp?aid=" & ansrs(0) & "&#062;" & ansrs(2) & "&#060;/a&#062; -- (" & ansrs(1) & ")<BR>"<BR> ansrs.MoveNext()<BR> Loop<BR>End if<BR><BR>Set ansrs = Nothing<BR>qrs.MoveNext()<BR>Loop <BR>Set qrs = Nothing<BR>End if<BR>Set conn = nothing<BR><BR><BR><BR>

  2. #2
    Shawn Clabough Guest

    Default RE: ADO resultset not showing -- please help!!

    Try changing this line:<BR><BR>Do while ansrs.eof<BR><BR>to<BR><BR>Do while not ansrs.eof

Posting Permissions

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