Best way to ensure a record is unique

Results 1 to 3 of 3

Thread: Best way to ensure a record is unique

  1. #1
    WebTech Guest

    Default Best way to ensure a record is unique

    Hi:<BR><BR>This is my first time posting, so I&#039ll try to keep it brief. I&#039m building sign-up page that will create a new database record for each new user. Of course, I want to ensure each user has a unique record. I could execute SQL that searches through the user DB looking to see if the new user&#039s email address or user ID is already present in the DB. <BR><BR>This could put a drag on performance if the user DB held thousands, or even tens of thousands of existing records (greate problem to have!). Is there a better, more efficient way to go about this? I&#039ll take *any* help I can get, but links to articles or tutorials would probably be most useful. <BR><BR>I&#039m developing with Access, but will use the Microsoft upgrade tool to upgrade to SQL Server. Any assistance would be most appreciated.<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Best way to ensure a record is unique

    Dont do that<BR><BR>"Select * from tablename where uid = &#039" & request.form("uid") "&#039 and email = &#039" & request.form("email") & "&#039"<BR><BR>what this will return is if there are any rows in the table with that uid and email the user entered. IF there are any records then the user already exists otherwise he does not

  3. #3
    WebTech Guest

    Default RE: Best way to ensure a record is unique

    Akhilesh - <BR><BR>Guess I did a poor job of explaining things. Your suggestion sounds like the idea I started with, but thanks for at least confirming that I was on the right track.<BR><BR>-WebTech

Posting Permissions

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