Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP 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
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 20th, 2003, 11:47 PM
Registered User
Join Date: Jun 2003
Location: , , Australia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to create a sequential order number?

Just wondering how to go about creating a sequential order number for a site I'm working on. I'm using an access database with asp pages. Is it possible to update a record in the database say if the customer gets to a certain stage of the order process? ie actually only increase the order number once they have submitted there details etc. I'm guessing I could make a simple table in the database that has an autonumber or increamenting number that gets updated upon submitting a form etc. Just not sure how to implement the update of this record, ie updating the database record while at the same time submitting the asp form as normal.

Will appreciate any words of advice.


Reply With Quote
  #2 (permalink)  
Old June 21st, 2003, 10:00 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi Andy,

The solution you propose should work well. Collect the info as they progress through the site, and when they reach a certain stage in the application (that is, ready for checkout) submit the details to the server, generate an order and return the OrderID.

There are a few ways to accomplish this, depending on your setup, the number of (concurrent) users etc. One way to do this, is to save the customer details in Session variables, and as soon as the customer wants to check out, pass the Session variables to the database to have it create the order.

Alternatively (and better scalable) you could save the customer details to a (temporary) database record and save the ShoppingCartID, or CustomerID in either a cookie or a Session variable. When you are ready to checkout, get the customer details from the DB using the CustomerID and then submit the stuff to the database (or just pass the CustomerID to the database, and create the Order entirely in the database).

If you need to find out how you can get the new OrderID, check out the following article at www.adOpenStatic.com:


If you have any questions, or need help with specific tasks, just post a message to this list.



Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old September 24th, 2003, 12:06 AM
Friend of Wrox
Join Date: Sep 2003
Location: Minneapolis, MN, USA.
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post

How about writing every record to the table and add a field to the table to flag whether the order is Actual or Estimate. Then filter them out as needed. After a certain time period you could dump the Estimates or perhaps use the info for tracking potential customers down the road.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
number not finding in ascending order mankoti_mankoti2000 Access 1 January 19th, 2007 01:07 AM
How can i create a number of page of group?? tetrap Crystal Reports 0 September 10th, 2006 10:08 AM
Rename multiple file upload in sequential order flyguylol PHP How-To 0 January 11th, 2006 06:05 PM
Create Sequential Numbering That Does not Skip mrslockdown2003 Access 4 May 11th, 2005 11:45 AM
Sequential numbering a non auto number field dbartelt Access 3 May 5th, 2005 02:56 PM

All times are GMT -4. The time now is 02:16 PM.

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