Board index » delphi » Connecting to IB5.5 without using a BDE-Alias

Connecting to IB5.5 without using a BDE-Alias

I'm trying to connect to an InterBase 5.5-Database without using a
BDE-Alias, i.e. giving the
TDatabase-Object the exact position of the gdb-file:

        with dmoDataMiner.dbsDatabase do
        begin
          Connected := false;

          dmoDataMiner.dbsDatabase.DatabaseName := 'c:\db\test.gdb';

          Params.Values['DRIVERNAME']      := 'INTRBASE';
          Params.Values['SERVER NAME']     := 'c:\db\test.gdb';
          Params.Values['USER NAME']       := 'SYSDBA';
          Params.Values['PASSWORD']        := 'masterkey';
          Params.Values['LANGDRIVER']      := 'DBWINWE0';
          Params.Values['SQLQRYMODE']      := 'SERVER';
          Params.Values['ENABLE BCD']      := 'true';

          Connected := true;
        end;  { with dmoDataMiner.dbsDatabase }

Executing the 'Connected := true'  - statement, Delphi comes up with a
EDatabaseError-message telling me that
there's an invalid parameter. If I disregard the ....DatabaseName :=
'c:\...' - statement, Delphi says that the name of the
database was missing. Where am I wrong?

Regards,

Sandro

 

Re:Connecting to IB5.5 without using a BDE-Alias


Set the DatabaseName property to something like My_Test. This creates a
temporary alias.Then this should show in the drop down for the database
property of your queries.

Quote
Thomann Informatik AG wrote:
> I'm trying to connect to an InterBase 5.5-Database without using a
> BDE-Alias, i.e. giving the
> TDatabase-Object the exact position of the gdb-file:

>         with dmoDataMiner.dbsDatabase do
>         begin
>           Connected := false;

>           dmoDataMiner.dbsDatabase.DatabaseName := 'c:\db\test.gdb';

>           Params.Values['DRIVERNAME']      := 'INTRBASE';
>           Params.Values['SERVER NAME']     := 'c:\db\test.gdb';
>           Params.Values['USER NAME']       := 'SYSDBA';
>           Params.Values['PASSWORD']        := 'masterkey';
>           Params.Values['LANGDRIVER']      := 'DBWINWE0';
>           Params.Values['SQLQRYMODE']      := 'SERVER';
>           Params.Values['ENABLE BCD']      := 'true';

>           Connected := true;
>         end;  { with dmoDataMiner.dbsDatabase }

> Executing the 'Connected := true'  - statement, Delphi comes up with a
> EDatabaseError-message telling me that
> there's an invalid parameter. If I disregard the ....DatabaseName :=
> 'c:\...' - statement, Delphi says that the name of the
> database was missing. Where am I wrong?

> Regards,

> Sandro

--
Ken Bailey
Falmouth Software Works Ltd.

Other Threads