Using Excel/DAO to execute mdb query on table linked to SQL... timeout?

taigovinda

Well-known Member
Joined
Mar 28, 2007
Messages
2,639
Hi,

I've got some VBA code in Excel that runs a list of mdb queries to import data from SQL directly into Access and then process the data in Access. One of the mdb queries looks at a view in SQL. I made the view to look at this year's data and everything works fine - takes about 90 seconds to run this step. I changed the view to look at this year and last year's data and Excel just hangs up and never comes back when it tries to run the mdb query. When I open Access and run the mdb query, it works fine and takes about 3 minutes.

Any idea what might be the deal here? I'm kind of at a loss... I'm using Access 2003 and the mdb query is like this:

Code:
INSERT INTO Temp_Store_SQL_Non_Travel
SELECT [dbo_vSFP001_NonTravelCubeOCS tgs].*
FROM [dbo_vSFP001_NonTravelCubeOCS tgs];

Thanks for any help.

Tai
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Any ideas here, why this (append) query works when run manually in Access but does not work when run in the MDB via Excel? Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,687
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top