View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LD LD is offline
external usenet poster
 
Posts: 10
Default 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!