[was redirected here] I have a problem that I can distill down to the
1/ A Visual C++ 6.0 program connects to a MS Access database using an
ODBC connection and sleeps for a long time. The connection takes all
defaults and uses CDatabase::useCursorLib in the OpenEx command.
2/ The database is well over 400MB large with over 200 tables and is
3/ Another process starts a winzip on that database that takes about 45
to 60 seconds to complete (wzzip -a -ex aaa.zip aaa.mdb).
4/ The Windows Task Manager shows 100s of MBs of available memory being
consumed. When the zip process finishes, the memory is not freed up.
If I repeat the above and do not run the sample C++ program that opens
the database, the zip process consumes no more than 11MB and frees the
memory up when done. If I lower the sleep time so the C++ program
exists before the zip process completes, the memory is freed up.
The MS access ODBC driver is version 4.00.6304.00
The code snippet that opens the database and sleeps is:
// open database connection to data source; prompt for uid,
wsprintf(szConnect, "DSN=%s;UID=%s;PWD=%s", "My DB",
if (pDatabase.OpenEx(_T(szConnect), CDatabase::useCursorLib))
strConnect = pDatabase.GetConnect();
printf("The Database Server is currently unavailable");