MSDN Archive Home
Help and FAQs
VSTO Bug Tracker
All Resource Updates
Create New Discussion
Import changes back to database, how???
Jun 12 2009 at 12:33 AM
Here it explain how you can export the data to excel and use ListObject to display it.
My question is now i want to retrive back the data from list object, and also I want publish my changes back to database. How can I do this?
Jul 2 2009 at 7:07 PM
In my example, I disconnect the ListObject from the dataset in the line of code "list.Disconnect()"
In a scenario where you want to write the database back to the database, you would remove this line of code because you want the ListObject to update the dataset as the user changes it in Excel. Then at some point in your application--like when the user chooses to Save, you would write back the dataset bound to the ListObject to the database you got it from. Typically you would have a table adapter somewhere that you would use to write back the data and you'd have a line like this below to publish your changes back to the database--this example comes from binding to a table called the "Customers" table.
Sign in to post message or set email notifications
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.