> Yes, you are correct, it is not an ADO.NET problem. ADO.NET gets the 61K
> records almost instantly. The bottleneck occurs in the binding of the
[quoted text clipped - 20 lines]
>> > Excel
>> > spreadsheet with a dataset from SQL Server?
When I call the myTableAdapter.Fill() operation, a blue rectangle appears
around all of the cells that were bound to the ListObject, but nothing else
is happening to the screen during the loading of the data. So when I tried
your suggestion, all that happened is that the blue rectangle didn't appear.
No performance improvement. The way I know that ADO.NET is fast is because I
tried the myTableAdapter.Fill() operation without being bound to the cells
and it executed in a second or two. I tried loading 2500 records and it
takes about 20 seconds with the bound ListObject for the data to appear. Why
can ADO.NET query 61K records instantly, but it takes 10 minutes to get them
into the Excel cells?
I'm using VB in VSTO, not VBA, so the syntax for me is
Globals.ThisWorkbook.Application.ScreenUpdating = false.
> Did putting this code in prior to the data binding help?
> this.Application.ScreenUpdating = false;
[quoted text clipped - 23 lines]
> >> > Excel
> >> > spreadsheet with a dataset from SQL Server?
Jim Rand - 07 Nov 2007 18:26 GMT
I'm just starting with VSTO. One concern that I have, other than deployment
issues, is the cost of interop calls between managed and unmanaged code.
Because of this concern, right from the get-go, I'll be limiting VSTO
programming to just those things that are unique to .NET such as obtaining
data via web services. The rest of the programming is going to be done
using straight VBA in the Excel unmanaged space.
An interesting experiment for you would be to write the data in csv format
to a file like "data.csv". Then, from within Excel, open "data.csv" as just
another worksheet.
> When I call the myTableAdapter.Fill() operation, a blue rectangle appears
> around all of the cells that were bound to the ListObject, but nothing
[quoted text clipped - 48 lines]
>> >> > Excel
>> >> > spreadsheet with a dataset from SQL Server?
Tom Garth - 15 Nov 2007 23:06 GMT
Whether it's ADO.NET or ADO in the VBA, copying an array to the worksheet has
been the quickest I have worked with.
There are lots of other options though. Great link here, with additional
links at the bottom.
http://support.microsoft.com/default.aspx/kb/321686

Signature
Tom Garth
> When I call the myTableAdapter.Fill() operation, a blue rectangle appears
> around all of the cells that were bound to the ListObject, but nothing else
[quoted text clipped - 37 lines]
> > >> > Excel
> > >> > spreadsheet with a dataset from SQL Server?