469,908 Members | 2,219 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,908 developers. It's quick & easy.

MS-Access, ODBC access with Visual C++ 6.0, and external actions on database

[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:

CDatabase pDatabase;
// open database connection to data source; prompt for uid,
char szConnect[255];
wsprintf(szConnect, "DSN=%s;UID=%s;PWD=%s", "My DB",
"", "bck_password");
if (pDatabase.OpenEx(_T(szConnect), CDatabase::useCursorLib))
strConnect = pDatabase.GetConnect();

catch (...)
printf("The Database Server is currently unavailable");
return -20;

Sleep ((DWORD)180000);

Any ideas?

Sep 28 '06 #1
0 992

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Comcast Mail | last post: by
5 posts views Thread by Don Wash | last post: by
reply views Thread by Christian McArdle | last post: by
reply views Thread by Christian McArdle | last post: by
3 posts views Thread by Christian McArdle | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.