View Full Version : insert new record with not duplicate record
03-23-2006, 03:06 PM
i want to insert new record which is will not duplicate with the previous record.
if the record duplicate, the error message will appear.how can i do it??
03-23-2006, 03:45 PM
Unless you have your database fields setup with a UNIQUE flag then you can do a select first and check against it.
username = "john"
SELECT from table where field = username
if NOT rs.EOF then
error - name already exists
INSERT INTO field values (username)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.