Preventing duplicate entries into Access based on 2 fields
Ok, here's the situation:
I know how to make an ASP form that will insert any inputted information into an Access Database and how to validate that no fields are empty, that the email field contains an "@", etc.
I have a client who wants to have users fill out a form to request a free sample of their product, but wants to prevent users from filling out the form 1,000 times and reselling it on eBay or something!
So, basically, I need a script that will check if the Street Address/Zip Code COMBINATION already exists in the database and if that combination exists, will not write a new, duplicate record and return an error message to the web page.
I've looked all over the web, and I've only been able to find how to check for duplicates in one field, not a combination of two fields. I know the basics of ASP, can create ASP forms, includes and the easy basic stuff, but I'm far from an expert and I hoped that someone could give me a hand!
Thanks in advance!
so, before you run the insert script run select statement to make sure those are not already in your data base and if they are not then insert it.
Thanks - I will do that (I knew it was something like that, but being only semi-ASP-literate, I wasn't sure)!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)