473,324 Members | 2,417 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,324 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 3604
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...
0
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.