Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cannot initialize borland database engine

2,209 views
Skip to first unread message

Jose Vilata Tamarit

unread,
Oct 10, 2001, 1:52:30 PM10/10/01
to
We develop high perfomance applications with BDE and We have found that when
run multiple instance of a program that uses BDE repeatedly we obtain the
error: "Cannot initialize borland database engine". Can anyone help me ?


Katharina Göhlich

unread,
Oct 11, 2001, 5:56:45 AM10/11/01
to
Hi,

if you use BDE-API (idapi32.dll), then only one file should exist (normally
located in bde-directory). If you start some applications from different
directories and in all directories an idapi32.dll is contained, this error
message occurs. When you use idapi.dll please update to idapi32.dll. (I think,
in idapi.dll you can only call DbiInit() once.)

Hope it helps
Katharina

Jose Vilata Tamarit

unread,
Oct 11, 2001, 6:25:05 AM10/11/01
to
Thanks Katharina, but the exact error is:

"An error occurred while attempting to initialize the Borland Database
Engine (error $2A04)"

I only have one executable but is called four to five times simultaniesly
and repeatedly. BDE is 5.2


Thanks again.

"Katharina Göhlich" <katharina...@alfabet.de> escribió en el mensaje
news:3BC56CDD...@alfabet.de...

Katharina Göhlich

unread,
Oct 11, 2001, 6:36:05 AM10/11/01
to
Hi,

which dll you use (idapi or idapi32) and how do you init BDE (DbiInit(?)).

Jose Vilata Tamarit

unread,
Oct 11, 2001, 7:02:45 AM10/11/01
to
Hi Katharina,

is idapi32.dll. You can proof the error with this code:
"
TForm1 = class(TForm)
Database1: TDatabase;
Table1: TTable;
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormShow(Sender: TObject);
begin
sleep(1000);
application.Terminate

end;
"

where you must configure database1 for any questions and table1 must point
to any table that you have. You set active to tur of both components and
create a .bat like this:

proof.bat:
:prin
start /w prueba.exe
goto prin

And now you lunch four or five proof.bat on your system (in win98, perhaps
in Nt needs more to hung). In a few moments your system hungs with that
error.

Bye

"Katharina Göhlich" <katharina...@alfabet.de> escribió en el mensaje

news:3BC57615...@alfabet.de...

Katharina Göhlich

unread,
Oct 11, 2001, 8:44:24 AM10/11/01
to
Hi,
sorry, I've anything done like you told me, but I can't get any error message. I
work on NT, Borland C++ Builder 5.0 and BDE version 5.1.1.

Do you have a list of BDE-Limitations?
There are f.i. :
48 Clients in system
32 Sessions per Client (3.5 and earlier)
256 Sessions per Client (4.0)
32 Open databases (3.5 and earlier)
2048 Open databases per session (4.0)
64 Sessions in system (3.5 and earlier)
12288 Sessions in system (4.0)

Paradox limitations:
254 Tables open per system (since 4.01)
1024 Open physical files (db, mb, px, x??, ... ) (since 4.01)

What's version of your BDE? Could you reach some limits?

Jose Vilata Tamarit

unread,
Oct 11, 2001, 9:58:47 AM10/11/01
to
I have tried the same example in a Windows 2000 server and I have the same
problem when I lunch about 10 "proof.bat" and the system CPU is about 100%
of utilization. You must run the proof about 10 or 15 minutes then it hungs.

The program is in Delphi 5 but I think Delphi is not the problem.

The proof is very simple please tried again.

Thanks..


"Katharina Göhlich" <katharina...@alfabet.de> escribió en el mensaje

news:3BC59428...@alfabet.de...

Jerry Bloomfield (TeamB)

unread,
Oct 13, 2001, 4:29:25 PM10/13/01
to
On Thu, 11 Oct 2001 12:25:05 +0200, "Jose Vilata Tamarit"
<jvi...@edicom.es> wrote:

>Thanks Katharina, but the exact error is:
>
>"An error occurred while attempting to initialize the Borland Database
>Engine (error $2A04)"
>
>I only have one executable but is called four to five times simultaniesly
>and repeatedly. BDE is 5.2

This is a known issue with the BDE, and it has existed for several years
(it is even mentioned in the BDE Readme file). Borland states that "this
happens in CGI applications, and recommends to convert the CGI application
to ISAPI to solve the problem.

In my experience, this happens to any application which uses the BDE and
is launched repeatedly and in rapid succession. I had encountered this
problem in an NT4 service we had written which did nothing but insert
records into a database table based on certain criteria (incoming data on a
TCP/IP connection, etc.) and we encountered this problem when our
application was running under heavy stress (more than 5 inserts a second).
We resolved the problem by removing the BDE from the picture and use the
ODBC API directly to access the database. This application runs 23.9x7 in
our production environment on several different machines and has been doing
so for about 2.5 years now. Daily we take about 5 minutes out of the
production schedule to stop the program and perform some DB maintenance to
help prevent other problems, otherwise this would be a 24x7 app. <g>

Jerry Bloomfield (TeamB)
--
http://www.teamb.com Jers...@wwa.com
Please do *NOT* send private e-mail without prior permission (my anti-spam
filters will probably just delete it anyway <g>)

Mike Schuler

unread,
Oct 20, 2001, 12:31:55 PM10/20/01
to
> This is a known issue with the BDE, and it has existed for several years
> (it is even mentioned in the BDE Readme file). Borland states that "this
> happens in CGI applications, and recommends to convert the CGI application
> to ISAPI to solve the problem.
>
> In my experience, this happens to any application which uses the BDE and
> is launched repeatedly and in rapid succession. I had encountered this
> problem in an NT4 service we had written which did nothing but insert
> records into a database table based on certain criteria (incoming data on a
> TCP/IP connection, etc.) and we encountered this problem when our
> application was running under heavy stress (more than 5 inserts a second).
> We resolved the problem by removing the BDE from the picture and use the
> ODBC API directly to access the database. This application runs 23.9x7 in
> our production environment on several different machines and has been doing
> so for about 2.5 years now. Daily we take about 5 minutes out of the
> production schedule to stop the program and perform some DB maintenance to
> help prevent other problems, otherwise this would be a 24x7 app. <g>
>
> Jerry Bloomfield (TeamB)
> --
> http://www.teamb.com Jers...@wwa.com
> Please do *NOT* send private e-mail without prior permission (my anti-spam
> filters will probably just delete it anyway <g>)

Jerry,

That is interesting - I tried MS ODBC and get a very poor Paradox insertion
performance - what ODBC driver are you using?

--
-------------------------------------
Mike Schuler
http://www.dbsurfer.com
Voice (604)926-2676
Catch the SQL wave - with DBsurfer.


Jerry Bloomfield (TeamB)

unread,
Oct 20, 2001, 7:37:26 PM10/20/01
to
On Sat, 20 Oct 2001 11:31:55 -0500, Mike Schuler <max...@dbsurfer.com>
wrote:

>That is interesting - I tried MS ODBC and get a very poor Paradox insertion
>performance - what ODBC driver are you using?

I was using the MS ODBC driver for Access97 MDB files. The problem exists
no matter what driver you use, as it appears to be in the BDE
initialization process. THe "solution" is to not load/process/unload the
BDE in rapid succession. Perhaps you can write one application which does
all of the DB I/O and a second which passes data back and forth to the
first. THe first could start on system start and remain running until
system shutdown, thus eliminating the need for a large volume of BDE
initializations. In our case, we choose to drop the BDE and write
straight to the ODBC API.

0 new messages