Upgrade record
Have you a sample please ?
Thank you
Carlo Cantoni
Have you a sample please ?
Thank you
Carlo Cantoni
Hi Carlo,
Assuming that you are referring to a cached dataset within the Excel workbook, one way that you could update the data in the Access database is to call the Update method of the TableAdapter.
The code below was created by using the Northwind database's Customers table which I used to create a cached dataset in the Excel workbook. I modified a record within the cached dataset and then called the following code to update the Customer's table with this change.
Globals.Sheet1.CustomersTableAdapter.Update(Globals.Sheet1.NorthwindDataSet.Customers)
Regards,
Ken Laws
MSFT
This posting is provided "AS IS" with no warranties, and confers no rights.
For more information regarding Visual Studio Tools for Office 2005:
Best of Blogs: Visual Studio 2005 Tools for Office
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/html/odc_landvsto2005_ta.asp
Visual Studio Tools for Office Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16
Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/office/understanding/vsto/default.aspx
Thank you
Carlo Cantoni
Hi Carlo,
Yes, you should be able to use the same code within a Microsoft Word VSTO project to update the underlying data source.
You would obviously need to change the code slightly such as:
Globals.ThisDocument.CustomersTableAdapter.Update(Globals.ThisDocument.NorthwindDataSet.Customers)
Regards,
Ken Laws
MSFT
This posting is provided "AS IS" with no warranties, and confers no rights.
For more information regarding Visual Studio Tools for Office 2005:
Best of Blogs: Visual Studio 2005 Tools for Office
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/html/odc_landvsto2005_ta.asp
Visual Studio Tools for Office Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16
Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/office/understanding/vsto/default.aspx