dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Preventing duplicate entries into Access based on 2 fields

Hybrid View

  1. #1
    Join Date
    Jun 2003
    Location
    Connecticut
    Posts
    6

    Question 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!

    A

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    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.

  3. #3
    Join Date
    Jun 2003
    Location
    Connecticut
    Posts
    6
    Thanks - I will do that (I knew it was something like that, but being only semi-ASP-literate, I wasn't sure)!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles