I have a problem with updating data in database from importing excelfile. What I want is:
1.Export table in database to excelfile
2. Make changes in excelfile
3. Via asp.net web form upload file, do some validation, and update table in database with changes from excelfile.
I have written code to get the current data to a dataset. Also been able to get the exceldata in to another dataset.
When I try to copy the datatable in the first dataset to the other( dataset ds1 = ds2.copy() )and then tries to do an sqldataadapter.update(). The changes are not updated in database.
Is this the wrong approach? Is it better to read the excelfile into a dataset. Truncate table in database and loop through each records in databable and do a sql insert?
View Complete Post