Subject Re: [IBO] Database connection in Delphi 7
Author Daniel Rail
Hi,

At October 7, 2004, 13:02, yaedos2000 wrote:



> Hi,

> I'm developing a database system for my project using Firebird and
> IBO components. I'm using IB_Connect to connect the database with the
> following code:

> cn.Params.Values ['Database'] := '127.0.0.1:C\Program
> Files\Firebird\Bin\TMS.GDB';
> cn.Params.Values ['user_name'] := 'tarak';
> cn.Params.Values ['password'] := 'test';
> cn.Connect;

> The code produces the run-time error "DataBase name cannot be blank."
> The same code works fine in another version of the database. Any
> ideas??!!

Try changing your code to:

cn.Server := '127.0.0.1';
cn.Protocol := cpTCP_IP; {If it's not already assigned in design-time}
cn.Path := 'C:\Program Files\Firebird\Bin\TMS.GDB';
cn.Username := 'tarak';
cn.Password := 'test';
cn.Connect;

It's just that the property DatabaseName is automatically formed by
combining the properties Server and Path.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)