Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8213733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:13:11+00:00 2026-06-07T11:13:11+00:00

The basic concept behind this code is that whenever it runs, the quantity from

  • 0

The basic concept behind this code is that whenever it runs, the quantity from an element decreases and the quantity from the same element, but from a different array, increases. For whatever reason, the second while loop only runs once and stops. For example, if total1 = 11 and total2 = 0, the first time the code is executed, total1 = 10 and total2 = 1. However after that, total1 = 9 and total2 = 1 and so on. Can anyone tell me what is wrong with my code? Any and all help would be appreciated.

<%
count = 0
do while NOT rs3.EOF
    if rs3("ITEM_NO") = itemnum then 
       qtyArray(count) = qtyArray(count) - qtyreq 
    end if
    if qtyArray(count) >= 0 and rs3("ITEM_NO") = itemnum then 
       total1 = total1 - qtyreq 
    end if
    count = count + 1
    rs3.MoveNext
loop
rs3.MoveFirst


pickcount = 0
do while NOT rs3.EOF
    if qtyPick(pickcount) >= 0 and rs3("ITEM_NO") = itemnum then 
        qtyPick(pickcount) = qtyPick(pickcount) + qtyreq
        total2 = total2 + qtyreq 
    end if
    rs3.MoveNext
    pickcount = pickcount + 1
loop
%>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:13:14+00:00Added an answer on June 7, 2026 at 11:13 am
    total2 = total2 + qtyreq 
    

    Please make sure “qtyreq” variable is not 0 and really adds +1 to your total2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a very basic concept, but something I have never been able to
This seems to be a pretty basic concept that I don't understand. In writing
I'm learning C++ from book. I think I understand basic concept but the book
I need to clear a basic concept. This code works fine. Can somebody explain
What is the basic concept behind WaitHandle in C# .net threading? Whats is its
I know about the basic concept of virtual function and run-time call. But i
I understand it is a very basic concept in the oops. But still I
I made some code, for understanding the concept/basic of pointer: int a=1; int *b=&a;
I have a basic concept question about tomcat cluster. That is, if I have
Let's consider this page's code-behind: public partial class Products : Page { private static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.