Solved

ODBC opening

Posted on 1998-08-11
6
196 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

831 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