473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

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?

Sep 27 '06 #1
2 7782
be*********@logicacmg.com 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
Sep 27 '06 #2
OK, and thanks for the redirect!
Thomas J. Gritzan wrote:
be*********@logicacmg.com 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
Sep 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
3
by: Bob | last post by:
All, I have read through lots of postings regarding my concerns, but I haven't found what I am looking for. The center (non profit University) where I work collects scientific data about...
0
by: Salad | last post by:
My operating system is WinXP Pro. I have 1 gig of memory and the chip is an Intel Pentium 4. I am using Access97. A table has been supplied to me from an external source createdc from Visual...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
0
by: | last post by:
I am working with the Microsoft 6 Visual Studio C++ standartd edition I have an ODBC access driver, and I got it to work in a tester program, but I get C++ mangled names when I try to use an MFC...
1
by: somersbar | last post by:
hey, ive been trying to set up a web form in visual basic.net that can access a microsoft access database. i need to use odbc also. i can get it working using a windows form but not a web form....
2
by: bert.medley | last post by:
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...
21
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement...
3
by: HistoricVFP | last post by:
Hello, I’ve been given the task of importing .dbf files from a very old version of Visual FoxPro (version 2.1) into Access (2003). When I import the data straight to Access it errors with: ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.