Solved

ODBC opening

Posted on 1998-08-11
6
186 Views
Last Modified: 2013-11-20
I've written an application that use a ODBC database.
The program works fine, but there is a little problem :

The first time I open the DB wiht DB.Open(), this opening takes a long time.
After if I do a DB.Close() and reopen the DB, it is immediate.

Does someone know where comes the problem from and how to solve it ?

0
Comment
Question by:moktar
  • 3
  • 2
6 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1320623
After opening and closing, it is cached. It will be much faster next time it is reopened since the system accesses it from the cache. It is reasonable if it does not take too long for the first time.
0
 

Expert Comment

by:babu_suresh
ID: 1320624
Its just a matter of caching.
0
 

Author Comment

by:moktar
ID: 1320625
There is not a way to make the first opening faster ?

Because my program works in real time, so the first request slows the execution.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 23

Expert Comment

by:chensu
ID: 1320626
You may open and close it before the first time you really want to access it.
0
 

Author Comment

by:moktar
ID: 1320627
Well, if it is the only way, I will try this.

But if it takes the datas from the cache, should I do a Requery after the openeing or is it done automatically?
0
 
LVL 23

Expert Comment

by:chensu
ID: 1320628
It depends on the system implementation. Normally the opening takes much time and the system should caches the important information for you. You may not need to do a query.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now