Solved

ODBC opening

Posted on 1998-08-11
6
206 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeateFront java challenge 31 95
windows 10 how make picture as desktop background 2 66
centeredAverage challenge 8 185
only14 challenge 19 84
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.

679 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