LOOP, please help URGENT

Results 1 to 3 of 3

Thread: LOOP, please help URGENT

  1. #1
    Join Date
    Dec 1969

    Default LOOP, please help URGENT

    hello, i&#039m posting this again:<BR>i have a loop <BR>&linklist=&#060;%Do While Not List.EOF%&#062;&#060;%=count%&#062;<BR>&#060;%=lis t("link")%&#062;%<BR>&#060;%List.MoveNext%&#062;<B R>&#060;%Loop%&#062;<BR>&#060;%Set List = Conn.Execute(sql)%&#062; <BR>but i need it to return me everything besides the last record. is it possible and how? thanks a million

  2. #2
    Join Date
    Dec 1969

    Default RE: LOOP, please help URGENT

    You could loop using the RecordCount property of the RecordSet and loop to that minus 1.<BR><BR>Dim i<BR><BR>For i = 1 to RS.RecordCount - 1<BR> Response.Write RS("link")<BR> RS.MoveNext<BR>Next<BR><BR>Hope that helps!<BR>jswartz@sentiat.com

  3. #3
    Polizei Guest

    Default RE: LOOP, please help URGENT

    I&#039m not sure if you put your code in the wrong order or if you just pasted more than you needed to but...<BR><BR>Recordset object has a RecordCount property as the others mentioned. To use it you will have to use a static cursor or a dynamic cursor. Other cursors will make RecordCount return -1.<BR><BR>Also, in the future, it&#039s un-necessary, if not annoying, to post multiple times asking the same question when others have given you the same answer. If you feel you still don&#039t get it, then re-word your question asking for clarification.

Posting Permissions

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