blocking the DB?

Results 1 to 3 of 3

Thread: blocking the DB?

  1. #1
    sergio Guest

    Default blocking the DB?

    i have an SQL DB thats suppossed to contain the list of users, and all the id fields have to be unique. at the time of registration my script checks if there is anybody in the DB with that id and if there is no, it adds it. but i am afraid that before it actually checks it and adds it up, at that particular milisecond somebody else is also trying to do the same thing, and this could bring to adding up two similar ids to the same DB. is there any way to prevent this, like blocking the DB for that particular login straight after the checking?

  2. #2
    J. Paul Schmidt Guest

    Default Buffer

    This may help so that one page is dealt with at a time a little more:<BR><BR> Buffer That Output by Charles Carroll<BR><BR><BR>Best regards,<BR>-Paul<BR><BR>J. Paul Schmidt, MBA<BR>Databases on the Web<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Unique constraint

    Set a unique constraint on the columns in the database<BR><BR>alter table members add constraint <BR> uniqueMembers unique(username)<BR><BR>If so you will get an error if you tries to insert a username that already exists.

Posting Permissions

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