Need Help! with Active Server Pages and MS Access

nitsuj3580

Platinum Member
Jun 13, 2001
2,668
14
81
Ok, here is my situation.

I have a simple form that I type data into that is then written to an Access Database.

one of the inputs on the form is a unique ID number. when I submit the form to the database, I want to be able to check to see if an ID number I am submitting is already being used? If it is being used, I want to display a message saying so. Anyone know how to do this with ASP? Any ideas anyone? thanks!
 
Jun 16, 2001
165
0
0
Query the database before you update to see if you can find a match on the id. If you do cancel the update, then send a page back saying the id already exists. You could put logic in the form page to redisplay it with the message (so they can just fix it).
 

Workin'

Diamond Member
Jan 10, 2000
5,309
0
0
If you want every record to have a unique id number, why not just use an auto-increment field type in your database? Then every record will automatically be unique.

Or are you looking at something like a password? Then you'll have to do like WhatWasIThinking said.