I am looking for the best way to import an excel spreadsheet using ado.net. Here is the breakdown:\
The information will get exported by another company to excel. Should I have then start at PK_ID 100,000 or something like that and maintain the key in the export for all the different data tables in SQL?
The spreadsheet will have over 100 columns that will need to maintain referential integrity throughout 9 tables. I also have to check one field in particular in the spreadsheet and compare it to the data table and if it exists in the data table in SQL then in is an update instead of an insert. So SQLBulkCopy won't work...
Is using a data table the way to go? Any suggestions would be helpful.
I was thinking maybe select the entire spreadsheet into a data table and then disburse the info into the 9 tables. Would a stored procedure be best? i can use return @@ID.
any examples of code would be great as I am no expert on this type of coding.
The information will get exported by another company to excel. Should I have then start at PK_ID 100,000 or something like that and maintain the key in the export for all the different data tables in SQL?
The spreadsheet will have over 100 columns that will need to maintain referential integrity throughout 9 tables. I also have to check one field in particular in the spreadsheet and compare it to the data table and if it exists in the data table in SQL then in is an update instead of an insert. So SQLBulkCopy won't work...
Is using a data table the way to go? Any suggestions would be helpful.
I was thinking maybe select the entire spreadsheet into a data table and then disburse the info into the 9 tables. Would a stored procedure be best? i can use return @@ID.
any examples of code would be great as I am no expert on this type of coding.