karfast

Hi, I tried out the walkthrough on creating a Master Detail Cached dataset in Excel. I followed each step precisely.

ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vstcore/html/419f4e07-c67f-4fc9-973a-bc794f349ac3.htm

Simple enough, and the data displays correctly.

Problem is that I cannot get the data to sync with the DB. I worked within DevEnv (VS2005 Team, SP1, VSTO SE), in debug mode i.e. havent deployed.

The data changes I made to the child table were saved in the excel, but did not reflect in the DB (SQL2005x64,SP1).

What have I missed

TIA

Kar



Re: Visual Studio Tools for Office Excel bound/cached data problem

karfast

Hi Again:

Request help again. Is there any code missing in the walkthrough Do I need to explicitly code to sync offline cache with the DB

TIA

Kar





Re: Visual Studio Tools for Office Excel bound/cached data problem

Douglas H. Troy

Looking at this example, this only explains/shows how to get data and view it in a disconnected state, not actually synch modified data back to the main database (which is far more involved).

After you've reconnected to the Database, you would need to code to handle the synch back-up to the master DB.

Refere to this MSDN article on the subject:

Working with Offline SQL Server Data in Excel

It discusses synchronizing changes back to the server ...

Hope this helps.





Re: Visual Studio Tools for Office Excel bound/cached data problem

karfast

Hi Douglas,

Thanks for your response. I had tried that sample out with .net 2003. The problem I had was that filling the excel took a lot of time. 9000 rows x 75 columns took about 15 min on a Pentium HT with 2GB ram. I figure it was because of multiple PIO calls (one for each cell range) across the COM/.net wall. I beat that prob by converting the datatable to XML, and using OpenXML, but I still had trouble with the update part. The values were getting offset in a way that I couldn't understand. E.g. if I updated cell 4,5 in my excel, it should have updated item (3)(4) in my dataset, but that wasnt the case.

So I moved to VSTO SE, with document level customization, and there is no real need to code for change events and update to cached dataset, but it turns out that I will have to write an explicit call to the Update method. I just read this in MSDN, and I hope that should solve it. http://msdn2.microsoft.com/en-us/library/y2ad8t9c(VS.80).aspx

Thanks once again

Kar