ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   QueryTable Memory Leak (https://www.excelbanter.com/excel-programming/310615-querytable-memory-leak.html)

Shawn A

QueryTable Memory Leak
 
This question has been posted in other, more oblique manners scattered
over this forum through the years but none of the answers satisfied
me.

I am using QueryTables with Excel 2003 to pull external data from SQL
Server. Every Refresh call (I have several QueryTables) chews up a
few more MB of memory, until Excel hits the limit of memory allocation
and goes toes up.

Is there a way to reclaim this memory?
If not, is there a way to prevent the memory leak?

This is the offender:

Range("XXX").QueryTable.Refresh BackgroundQuery:=False

Please post any solutions you may have come across.

Thanks,
Shawn

Jamie Collins

QueryTable Memory Leak
 
(Shawn A) wrote ...

I am using QueryTables with Excel 2003 to pull external data from SQL
Server. Every Refresh call (I have several QueryTables) chews up a
few more MB of memory, until Excel hits the limit of memory allocation
and goes toes up.


Can't reproduce. More details, please.

Jamie.

--

Shawn A

QueryTable Memory Leak
 
I have fixed my problem. It was through fault of my own (and a known
bug in Excel) which was causing this issue.

It turns out I was pulling data from my own file, which causes
extraordinary memory leaks and which MS admits to being an outstanding
Excel bug. Dumping into an external file and querying this cured my
woes.

Cheers,
Shawn

(Jamie Collins) wrote in message om...
(Shawn A) wrote ...

I am using QueryTables with Excel 2003 to pull external data from SQL
Server. Every Refresh call (I have several QueryTables) chews up a
few more MB of memory, until Excel hits the limit of memory allocation
and goes toes up.


Can't reproduce. More details, please.

Jamie.

--



All times are GMT +1. The time now is 02:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com