I tried the mention below query to stop duplicate before inserting data. It works fine with SQL database but its not working with access database. I want the same query to stop duplicate before inserting data to my access database. waiting for positive response. Thanks
IF NOT EXISTS (SELECT *
FROM dbo.Product
WHERE email = @email)
INSERT INTO dbo.Product(list of columns)
VALUES (list of values)
In both cases (SQL Server and MS Access) you should create a proper UNIQUE INDEX on the email column of the Product table.
For MS Access: http://office.microsoft.com/en-us/access-help/prevent-entry-of-duplicate-values-mdb-HP005187564.aspx
For SQL Server: http://technet.microsoft.com/en-us/library/ms189280.aspx