Solved

Connects/Disconnects BDE problem

Posted on 1998-06-12
1
192 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

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

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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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