Results 1 to 2 of 2

Thread: Incrementing

  1. #1
    Eric Perez Guest

    Default Incrementing

    I would like to increment a variable for confirmation purposes. The thing is that this is only to be used in one page, and its a matter of the user ordering something so I don&#039t want to really put it on the global.asa On_Start.<BR>I would like to give users an order confirmation number that increments everytime somebody orders something. Pretty simple, but then again I&#039m a ASP newbie.

  2. #2
    Join Date
    Dec 1969

    Default RE: Incrementing

    If you are using a database table, you can use an autoincrement field. This is the best approach in my opinion, since it guarentees a unique ID #.<BR><BR>What you could do is make an Application variable and increment it each time a new order happens. The problem is, anytime the server is rebooted, that Application variable will get reset, so you cannot guarentee uniqueness! A database IDTENTITY (or Autonumber) field is surely the way to go.<BR><BR>Good luck!

Posting Permissions

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