Trying to add a record by setting all the rows in each table to

For Each row As DataRow In Me.TTSDataSet.SiteInfo.Rows


then i use a tableadapter to update the record, but then i have already encountered a duplication issue.

So i would like to check the destination database to determine if the record exist either by name or some attribute to avoid conflict. Can some show me a possibility.

Then i can trigger the row.SetModified()


Re: .NET Framework Data Access and Storage Trying to add a record to a SQL 2005 DB via Vb 2005 Application but avoid Duplicate Records


To uniquely identify records, you need to have primary key and check if record exists based on a values in primary keys. I believe you could do it using stored procedure, passing values for the record to it, checking if it exists, based on PK and return or insert record, based on the check