Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 29th, 2004, 12:22 AM
Authorized User
 
Join Date: Jul 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default nested loop problems...

I have been looking at the same code for about an hour with no luck so even though I dont think this is a pro code I would appreciate some help...

I have nested loops - the problem I am encountering is that when the outer loop is entered once the inner loop loops the correct amount of times, once the outer loop is entered more then once the inner loop loops one additonal time...here is the code I cant seem to spot my error...

 orss.open "rg", objconn, adopenkeyset, adlockoptimistic



     do while not ors.EOF



      for I = 0 to ors("wl_quantity")

      orss.addnew

      orss.fields("rg_registry") = registryid
      orss.fields("rg_product") = ors("wl_product")

      orss.update

      next



     ors.MoveNext
    loop


 
Old November 29th, 2004, 09:04 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

  What do u mean by

when the outer loop is entered once the inner loop loops the correct amount of times, once the outer loop is entered more then once the inner loop loops one additonal time...


The outer loop is loops thru recordset. Inner loop loops thru a value in recordset field. Whats u r actual requirement.


----------
Rajani

 
Old December 5th, 2004, 09:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Elladi,

Can you explain what exactly you are trying to do with this code. Then it might be helpful in understanding what is missing in that code posted here.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested For-Each Loop In XSLT dghosh XSLT 10 July 2nd, 2008 04:34 AM
QueryTables nested loop Sherman McCoy Excel VBA 0 June 4th, 2008 02:37 PM
nested loop adnan2 Java Basics 1 July 13th, 2007 04:21 PM
Nested Do Until Loop goels Access VBA 2 September 30th, 2004 08:44 AM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.