Excel/VBA – using spool when accessing databaseLocked
I’m testing a simple VBA code which reads data from a remote mySQL DB and displays it in an Excel worksheet. Everything works fine until I print the sheet(Print/Print preview or Cute PDF).
After printing, the DB access becomes painfully slow. The cure is to Exit and reopen the worksheet.
I can observe that Excel continues to use the spool directory after printing, but do not understand why this happens.
ADDITIONAL NOTE! The problem is related to writing the data to the worksheet – NOT the database access.
I have Excel 2002, Windows XP SP2 and a Canon iP200 printer.
Filemon example when retreving data (after printing):
EXCEL.EXE:2616 FASTIO_QUERY_STANDARD_INFO C:\WINDOWS\System32\spool\DRIVERS\COLOR\CNBJPRN2.ICM SUCCESS Length: 17372
EXCEL.EXE:2616 IRP_MJ_CLOSE C:\WINDOWS\System32\spool\DRIVERS\COLOR\CNBJPRN2.ICM SUCCESS
spoolsv.exe:1440 IRP_MJ_CREATE C:\WINDOWS\System32\spool NAME COLLISION Options: Create Directory Access: All
spoolsv.exe:1440 IRP_MJ_CREATE C:\WINDOWS\System32\spool\DRIVERS NAME COLLISION Options: Create Directory Access: All
spoolsv.exe:1440 IRP_MJ_CREATE C:\WINDOWS\System32\spool\DRIVERS\W32X86 NAME COLLISION Options: Create Directory Access: All
Anybody having a suggestion what is going on and how to get rid of this annoying issue ?