So check if it is in the table before you do the insert, by using SELECT to eitehr return matching records or return the count of the records and check it for zero:
SELECT COUNT(*) FROM MyTable WHERE myColumn=MyValu
You could cretae a stored procedure to check and then insert if it doesn't exist, but I'd rather do it expicitly and report a problem to the user sensibly instead.