FIREBIRD Questions and Answers

How to connect with Firebird database in Delphi using TSQLConnection?

This question is related to Delphi developers. TSQLConnection component is used to connect with firebird in Delphi. Below is code snippet for making firebird database connection in Delphi.

begin
SQLConnection1.ConnectionName := ‘Devart InterBase’;
SQLConnection1.DriverName := ‘DevartInterBase’;
SQLConnection1.GetDriverFunc := ‘getSQLDriverInterBase’;
SQLConnection1.Params.Values[‘LibraryName’] := ‘dbexpida40.dll’;
SQLConnection1.Params.Values[‘VendorLib’] := ‘fbclient.dll’;
SQLConnection1.Params.Values[‘HostName’] := ‘hostname’;
SQLConnection1.Params.Values[‘Database’] := ‘databasename’;
SQLConnection1.Params.Values[‘User_Name’] := ‘username’;
SQLConnection1.Params.Values[‘Password’] := ‘password’;
SQLConnection1.LoginPrompt := False;
SQLConnection1.Open;
end;