Iterative process of running queries frequently abends for no clr.

L

LD

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top