
June 28th, 2011, 11:16 PM
|
|
|
|
There are a couple approaches you can take. I usually just query the db for the record in question, look at the resulting recordset and see if it's empty or not, if empty proceed with the insert else provide a message about the record already existing.
Within the DB you can put a unique index on the record, and your code can just do the insert and check for an error or not returned by the db.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
|