Board index » delphi » bde error $2104 in bde help example

bde error $2104 in bde help example

Hi,  I posted this to delphi.database.desktop but didn't get a
response.

I'm trying to use the Delphi example for DbiGetDatabaseDesc in the
BDE Online Reference help file for D5.

Every time I try to run it I get the $2104 error which indicates an
out of memory problem.

I suspect an error in the example.  If you don't have the example
handy, Here it is:

******** Start of quote *******************
Retrieve the description of the specified database from the
configuration file.

This example uses the following input:

  ShowDatabaseDesc('IBLOCAL');

The procedure is defined as:

procedure ShowDatabaseDesc(DBName: string);

const
  DescStr = 'Driver Name: %s'#13#10'AliasName: %s'#13#10 +
    'Text: %s'#13#10'Physical Name/Path: %s';
var
  dbDes: DBDesc;
begin
  Check(DbiGetDatabaseDesc(PChar(DBName), @dbDes));
  with dbDes do
    ShowMessage(Format(DescStr, [szDbType, szName, szText,
szPhyName]));
end;

********* End of quote **************

I put  ShowDatabaseDesc('<myalias>');

in the OnClick of a button and always get this error.  I've tried
various aliases, but it doesn't make a difference.

I have units BDE and DBTables in my USES clause.

Is there an error in the example?

Thanks,  Frank

 

Re:bde error $2104 in bde help example


Error $2104 = Cannot find engine configuation file. Not at all related to
memory problems

Mick

Quote
Frank Dreyfus <fdrey...@nyw.com> wrote in message

news:Xns9209859523C9Badfslur0mdoaur03jadl@207.105.83.65...
Quote
> Hi,  I posted this to delphi.database.desktop but didn't get a
> response.

> I'm trying to use the Delphi example for DbiGetDatabaseDesc in the
> BDE Online Reference help file for D5.

> Every time I try to run it I get the $2104 error which indicates an
> out of memory problem.

Re:bde error $2104 in bde help example


OK, my mistake.  I did a search on community.borland.com and found
the reference to a memory problem which was misleading.

But the question remains, why doesn't the example code work?  

I can open any db aware object and the bde works so the config file
must be available.  I can even run the example from within one of
my projects.  But when I try to run in alone (in it's own project)
it fails.

Why?

Thanks,  Ed

"Mick Arundell" <mikc...@bigpond.com> wrote in news:3cdf039b_1
@dnews:

Quote
> Error $2104 = Cannot find engine configuation file. Not at all
related to
> memory problems

Other Threads