views:

46

answers:

1

Hi,

I'm doing updates from Excel/CSV files to a database. I'm using LINQ to SQL for database operations. I have quite a few columns to update/insert, so I guess it would be easier to generate a Checksum somehow for the whole row.

For example I can have the same person [firstname,lastname,ssn,address] in the destination table, BUT sent by another company, so they are only differ by one integer value); so I'm wondering, is there a solution to make sure I'll have a unique Checksum for all my unique rows?

Should I rather implement it somehow in a stored procedure?

A: 

You could put a unique constraint on the destination table and add error handling code in the application. You can also modify the validation on the partial classes.

FinnNk
I did it with constraints, and thanks for the suggestion on validation, I'll work out some in version 2.0:)
balint