|  | Posted by Gordon Burditt on 06/14/05 16:20 
>> The database can do this by implementing a unique constraint on the column>> user_name.  After issuing the INSERT, (or any SQL command), check for an
 >> error, and report it.  This then solves your general problem of enforcing
 >> data integrity and reporting errors.
 >checking for the SQL error is not a good idea, actually.
 >Well known programing prupose to use select before insert.
 
 This has the well-known problem that you may find the name not
 in use, insert it, and find the name has been taken before you
 got to it - unless you've gotten a lock first.
 
 Gordon L. Burditt
  Navigation: [Reply to this message] |