Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > MS Access, ODBC using Visual C++ 6.0, and external functions

Reply
Thread Tools

MS Access, ODBC using Visual C++ 6.0, and external functions

 
 
bert.medley@logicacmg.com
Guest
Posts: n/a
 
      09-27-2006
I have a problem that I can distill down to the following.

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
compacted.

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;
try
{
// open database connection to data source; prompt for uid, passwd
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;
}

printf("Sleeping....");
Sleep ((DWORD)180000);
printf("done\n");

Any ideas?

 
Reply With Quote
 
 
 
 
Thomas J. Gritzan
Guest
Posts: n/a
 
      09-27-2006
schrieb:
> I have a problem that I can distill down to the following.
>
> 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.


_Any_ Microsoft newsgroup would be better to ask. Look here:
http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

--
Thomas
http://www.netmeister.org/news/learn2quote.html
 
Reply With Quote
 
 
 
 
Bert
Guest
Posts: n/a
 
      09-28-2006
OK, and thanks for the redirect!


Thomas J. Gritzan wrote:
> schrieb:
> > I have a problem that I can distill down to the following.
> >
> > 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.

>
> _Any_ Microsoft newsgroup would be better to ask. Look here:
> http://www.parashift.com/c++-faq-lit...t.html#faq-5.9
>
> --
> Thomas
> http://www.netmeister.org/news/learn2quote.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
64 bit ODBC and a 32 bit ODBC Harrysmithsteven@gmail.com Windows 64bit 5 07-16-2008 02:34 PM
Re: The ODBC resource DLL is a different version than the ODBC driver manager tenkbabe@yahoo.com Computer Support 0 10-16-2006 01:11 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57