Solved

Connects/Disconnects BDE problem

Posted on 1998-06-12
1
194 Views
Last Modified: 2013-11-23
Hi folks,

My program uses a lot of tables (63). When i start the program it opens a table, read the contents it needs, closes the table. This for each table. I've got a 16 bit and a 32 bit version of the program.The problem is that the 16bit version takes about 10 min. to load and the 32bit only 10 sec. I connect to the database (db2,oracle,etc) via odbc. When i look at the odbc trace, i see that there are a lot of connects and disconnects in the odbc statements when i use the 16 bit version and this doesn't happen  when i use 32 bit version. Session and database keepconnected are set on true. I think that there is a problem with the BDE.The 16 bit version uses BDE 2.5 and the 32 bit version uses BDE 3.0 or 3.5.
How can i make the 16 bit version faster?

Thanks in advance,
0
Comment
Question by:Didi
1 Comment
 
LVL 3

Accepted Solution

by:
Pegasus100397 earned 100 total points
ID: 1352435
Didi,

  It appears as if the program is attempting to open the database DURING the load, this could be happeinging because the TDatabase.Connected property is set to true during design time. Make sure it is NOT (had the same problem myself).

In the OnActivate section of the main form, try this...

Form1.Refresh;  {update the screen}
DatabaseObject.Connected := False;
Table1.Open;
{read from table}
{Table2.Open}
{read from table}
DatabaseObject.Connected := False;

The last line will automatically close all of the tables you opened that were connected to that database object.

Good luck with your project!
Pegasus

0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE2 application frozen on Windows 10 10 312
find a node in VST 2 68
QRReport  TQrmemo vertical stretching 1 46
DBGrid or StringGrid ? 6 89
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

778 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