I use a lot of VBA macros to retrieve data from a large database and manipulate it in Excel. One of the commands I use routinely is "QueryTable.Refresh". Most of the time, it works perfectly.
Occassionally, when the file that I'm extracting the data from is very large, the macro stops with a "Runtime Error 1004 - General ODBC Error". When I try to debug it, I find that it has stopped at the "QueryTable.Refresh" command. Sometimes I can continue running it from this point. Other times, when I try to continue running it, I find that it has lost it's connect string. I have to manually enter it.