There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer audio black screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
ASP - incrementing numbers


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Seema25's Avatar
Junior Member with 3 posts.
 
Join Date: Dec 2001
19-Jan-2002, 07:59 AM #1
ASP - incrementing numbers
hi,

I got a question to be solved. Does anyone know how to write the code to increment the product number and pass it on to the next page, to be added to the database, so the user doesn't have to type it in? Basically, i want to take the last product number from the product page, increment it to the next number (the product number or any id's has to be hidden on the product page), so if the last number in the db is 0012 i want the next number to be 0013, pass it to the addprod page and show it on the form and then have it stored in the db with that particular product - so every product has a unique product number.


any help would be great

seema
Spu's Avatar
Spu Spu is offline
Member with 72 posts.
 
Join Date: Nov 2001
Location: UK
23-Jan-2002, 02:24 PM #2
I don't know if i understand your question (sorry for being stupid). The way i see it is that you want to let your users to add products (insert records) to your database with unique ID numbers, is this right?

If it is, its a simple operation, especially if your using MM Ultradev.

What are you writing the script in, ASP, Coldfusion, PHP, etc.? And what database are you using, Access, SQL?
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
24-Jan-2002, 11:33 PM #3
If you are writing to an Access db your table should already be set up to have a primary key that will increment every time a new record is added. If it's SQL just do a query that looks for the max and then add 1 to it in the appropriate field.
__________________
**Disclaimer** Anything below this line ^ is part of my signature for those that may be confused

Sadly, there are no integers on this scale, so your gangly adolescent attempt to be clever has proved futile....Dieter

I have the right "NOT" to be tolerant of others because they are different, weird, or tick me off.....Parody of Andy Rooney

There are no stupid questions, but there are a LOT of inquisitive idiots.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:10 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.