473,748 Members | 10,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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::useC ursorLib 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(szConn ect, "DSN=%s;UID=%s; PWD=%s", "My DB",
"", "bck_password") ;
if (pDatabase.Open Ex(_T(szConnect ), CDatabase::useC ursorLib))
{
;
}
strConnect = pDatabase.GetCo nnect();
}
catch (...)
{
printf("The Database Server is currently unavailable");
return -20;
}

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

Any ideas?

Sep 27 '06 #1
2 7795
be*********@log icacmg.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::useC ursorLib 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*********@log icacmg.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::useC ursorLib 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
4751
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 appreciated. Thanks in advance
3
2392
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 subjects enrolled in studies related to respiratory diseases. Both lab data and questionnaire information are collected. We use W2K as PC operating systems, MS Access XP, XP Developer, and Visual SourceSafe. Our databases use a front end – back end...
0
1777
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 FoxPro file, version 6.0. If I connect to it using File/GetExternalData/Link and select FoxPro as the file type and it links OK. I press Open and the table opens just like an Access table...quickly. There are 557 records. The problem is that...
1
3347
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. ... www.soft30.com/download-1-11975.htm - 31k - Cached - Similar pages MDBSecure 1.0.8.0 - Soft30.com Utility which makes it easy to create secure MS Access Databases, ... MS Access 2000/2003 format. 30 day money back guarantee, 30 day trial. ...
0
2125
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 application. Can I get microsoft support for this. I put these statements in a header but it still didn't work.. I would like to ask for a support but I forgot how.
1
1953
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. might be that ive set up the database wrong using the odbc data source administrator? i get an error saying that it cant find the data source, when i put in the following line of code in my webform.aspx.vb file:...
2
3614
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 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
21
4690
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 (16 fields) takes less than 30secs, but because of db-bloat, I moved the local table to a 2nd MDB and per postings, this 2nd MDB is copied into a folder and linked as a 'temp' MDB every time I run my reporting mdb
3
5174
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: External table is not in the expected format. (Error 3274) I’ve tried the following but it did not work: “To import data from a FoxPro database, use the Microsoft Visual FoxPro ODBC driver. To do so, follow these steps: 1. Click Start, and then...
0
8989
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.