Solved

Connects/Disconnects BDE problem

Posted on 1998-06-12
1
190 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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

12 Experts available now in Live!

Get 1:1 Help Now