asp.net - windows service for data insertion -


i have created windows service data-insertion.time interval 1 min.after 1 min, data insert table.data inserted table @ multiple time.i don't want that,only 1 time.how that?may need check in database wether entry there or nor if not add.

you can use query before inserting data.

if exists(select * dbo.yourtable name = @name)  return 

-- here, after check, insert might want create unique index on name column make sure no 2 rows same value exist:

create unique nonclustered index uix_name on dbo.yourtable(name) 

hope you.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -