This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Andrew thank for the reply. You suggested is actually part of the solution that I finally did come up with.
Several issues were contributing to my problem, most of them related to how I created my SQL table.
1. My first mistake was when creating my primary key I used a seed value of zeror (0) instead of (1) as a result when I was trying to use Update /Insert if New and using a zero-value for the Id I was getting a duplicate primary key.
So now I'm using [Id] [bigint] IDENTITY(1,1) NOT NULL instead of [Id] [bigint] IDENTITY(0,1) NOT NULL,
2. Secondly, when I defining your primary key contraint, you have the option of IGNORING DUP KEYS.