To find out if a record exists, you can use IF EXISTS in a stored procedure.
Alternatively, just fire a normal SELECT query. If there are any records (the recordset is not EOF) then don't allow the insert, otherwise execute the INSERT statement.
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Sabotage by
Beastie Boys (Track 6 from the album:
Ill Communication)
What's This?