Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Connects/Disconnects BDE problem

Posted on 1998-06-12
1
Medium Priority
?
199 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 300 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

772 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