Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VSTO Excel Rows to SQL Server 2005

I have a VSTO app (VS 2008) that allows users to combine data from 2
or more Excel 2007 worksheets in the active workbook. Currently I am
sending the data back to SQL Server to do the heavy lifting. I'm
looping over the rows and inserting each via a stored proc.
Unfortunately with anything over a hundred or so rows it runs really
slow and I am running into MDA messages (ContextSwitchDeadlock was
detected).

Is there a better/faster way to load this data into SQL Server?

I like VSTO as opposed to VBA which I understand may be faster at this
because it provides a nice add-in that users can add or remove.

SSIS is not really an option for me because the data will in the
sheets will be generated on the fly by the user based on an OLAP
drillthrough - so I would prefer not to have to save the file.

Any thoughts are appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default VSTO Excel Rows to SQL Server 2005

I have had great success looping through thousands of rows and saving them
via a stored procedure to a SQL Server database using VBA -- when directly
connected to the LAN the speed is quick -- a couple of seconds but then
again the tables were smallish.

The only slowdown I have seen is when performing this through a VPN but
hundreds of rows should be no problem. If these are humongous tables with
constraints or triggers maybe you are running into some performance
issues...

Another way to do this is to write everything to a temporary table with no
constraints and at the end of the loop perform a batch insert/update from
the temp table the the real table.

Just a thought.

--
Tim Zych
http://www.higherdata.com
Workbook Compare - free and pro versions

"Jim" wrote in message
...
I have a VSTO app (VS 2008) that allows users to combine data from 2
or more Excel 2007 worksheets in the active workbook. Currently I am
sending the data back to SQL Server to do the heavy lifting. I'm
looping over the rows and inserting each via a stored proc.
Unfortunately with anything over a hundred or so rows it runs really
slow and I am running into MDA messages (ContextSwitchDeadlock was
detected).

Is there a better/faster way to load this data into SQL Server?

I like VSTO as opposed to VBA which I understand may be faster at this
because it provides a nice add-in that users can add or remove.

SSIS is not really an option for me because the data will in the
sheets will be generated on the fly by the user based on an OLAP
drillthrough - so I would prefer not to have to save the file.

Any thoughts are appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VSTO Excel Rows to SQL Server 2005

Thanks Tim, perhaps I can look at adding the VBA dynamically at
runtime. My SQL tables are real lean with no constraints so I think
the issue is related to VSTO and interop.


On Mar 9, 2:52*am, "Tim Zych" <tzych@nospam at earthlink dot net
wrote:
I have had great success looping through thousands of rows and saving them
via a stored procedure to a SQL Server database using VBA -- when directly
connected to the LAN the speed is quick -- a couple of seconds but then
again the tables were smallish.

The only slowdown I have seen is when performing this through a VPN but
hundreds of rows should be no problem. If these are humongous tables with
constraints or triggers maybe you are running into some performance
issues...

Another way to do this is to write everything to a temporary table with no
constraints and at the end of the loop perform a batch insert/update from
the temp table the the real table.

Just a thought.

--
Tim Zychhttp://www.higherdata.com
Workbook Compare - free and pro versions

"Jim" wrote in message

...

I have a VSTO app (VS 2008) that allows users to combine data from 2
or more Excel 2007 worksheets in the active workbook. Currently I am
sending the data back to SQL Server to do the *heavy lifting. I'm
looping over the rows and inserting each via a stored proc.
Unfortunately with anything over a hundred or so rows it runs really
slow and I am running into MDA messages (ContextSwitchDeadlock was
detected).


Is there a better/faster way to load this data into SQL Server?


I like VSTO as opposed to VBA which I understand may be faster at this
because it provides a nice add-in that users can add or remove.


SSIS is not really an option for me because the data will in the
sheets will be generated on the fly by the user based on an OLAP
drillthrough - so I would prefer not to have to save the file.


Any thoughts are appreciated.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VSTO 2005 Excel Addin Lucky Luke Excel Programming 0 July 26th 07 03:16 PM
VSTO 2005 - How to use ThisWorkbook as an Excel.Workbook dbKemp[_2_] Excel Programming 1 October 16th 06 09:40 AM
VSTO 2005 Excel picturebox control question Doug[_16_] Excel Programming 6 August 4th 06 06:41 AM
VSTO 2005 Excel picturebox question doug Excel Programming 0 July 25th 06 02:15 PM
reference vsto Excel ListObject in Vb.Net 2005 project/app softengine Excel Programming 0 September 27th 05 08:21 PM


All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"