Batch Processing
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3464
Printed Date: 29 March 2026 at 11:56pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Batch Processing
Posted By: ngaisteve1
Subject: Batch Processing
Date Posted: 12 June 2003 at 1:14am
|
How do I do batch processing? Eg, if I want to add a quantity, I will first search for the item, get the item id and if not found in db, add to db. How do I make it when I search, list of searched item came, and next to each item got a textbox that user can key in quantity of few items in the same screen and once click the "Done" button, all those item will be added. I can do multiple delete by deleting all selected (checkbox) items, but in this case, I really don't know how. Anyway can help? Thanks.
|
Replies:
Posted By: ngaisteve1
Date Posted: 12 June 2003 at 1:46am
|
Ok, I have an idea. Since I managed to get the multiple id, what about using for loop? First, count how many id (records) are they. Eg, if got 4 id, it will loop 4 times creating a form for me to key in a quantity. After the forth, it's done. Is this workable? This is what I have in mind.
|
Posted By: ljamal
Date Posted: 12 June 2003 at 8:37am
I usually pass the ID field to the script as comma delineated string and use the Split function to create an array. I then Loop through the array and update the information as necessary.
------------- L. Jamal Walton
http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming
|
Posted By: ngaisteve1
Date Posted: 12 June 2003 at 7:11pm
|
Do you have a simple example or any resources (url) about this? Thanks, ljamal.
|
Posted By: ljamal
Date Posted: 12 June 2003 at 8:10pm
If you use the shopping cart update function at http://www.bullcitycomics.com - Bull City Comics , you will see an example of it.
------------- L. Jamal Walton
http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming
|
Posted By: ngaisteve1
Date Posted: 12 June 2003 at 10:04pm
|
Hey ljamal, it won't update quantity. It can only delete when quantity is zero
|
Posted By: ljamal
Date Posted: 12 June 2003 at 10:37pm
Read the page, the inventory management system doesn't let you increase the quantity beyond what is available. So if there is only 1 you will not be able to increase your quantity above one. If you order something like http://www.bullcitycomics.com/bcc/prod.asp?CatID=&ProdID=matrix-nn-nm - this that has an inventory greater than 1, then you will be able to update the quantity.
Back on topic, the delete and update function both use the batch system, I described earlier.
------------- L. Jamal Walton
http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming
|
|