ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Iterative process of running queries frequently abends for no clr. (https://www.excelbanter.com/excel-programming/415635-iterative-process-running-queries-frequently-abends-no-clr.html)

LD

Iterative process of running queries frequently abends for no clr.
 
My spreadsheet macro iterates through a list of customers. For each customer
it executes a series of parameter queries. The queries are passed to an
external database (ORACLE) through an ODBC connection. The process
frequently abends when it is trying to refresh a query. Once this situation
is encountered, my only recourse is to close the spreadsheet, reopen it, and
try it again. Sometimes it will only go through a couple customer
iterations. Other times it will go through 30 to 40. I don't believe it has
anything to do with the actual data being returned.

When it does hang-up on a query refresh, I cannot refresh any queries in the
spreadsheet, and if I open another spreadsheet with queries, they will not
refresh either. Again, my only recourse appears to be to close all the
spreadsheets and try it again.

I believe my macro is deleting all "External Data" queries after it uses
them, but I am suspicious that something related to the iterative process of
creating queries is causing the problem. Any suggestions would be most
appreciated. Thanks!


All times are GMT +1. The time now is 05:32 AM.

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