Subject Re: [IBO] IBObjects (T. Patel)
Author Helen Borrie
At 04:14 PM 25/07/2004 +0100, Tarek Patel wrote:
>
>CAN YOU GIVE ME CODE TO GETCONNECTION BETWEEN DELPHI 7 AND FIREBIRD 1.5
>THROUGH IBO4.
>

First, please don't hijack other people's threads!!

The basic things are:

1. Install IBO according to the How_To_Install.txt document
2. Start a new application in Delphi
3. Drop a TIB_Connection on the form. For convenience, change its Name
property to something simple, like cn
4. Set these properties:

Server: network name of the server, or localhost if you are on the same
machine that is hosting the Fb server.

Path: absolute path to the database, as seen from the server, e.g.
c:\Program Files\Firebird\Firebird_1_5\examples\employee.fdb

Protocol: select cpTCP_IP

Username: use SYSDBA for now

Password: masterkey, or whatever you changed to the SYSDBA password to

PasswordStorage: change to psNotSecure

5. Drop a TIB_Transaction on the form. Name it something simple like tr1.

Set the IB_Connection property of the transaction by selecting your
connection object (cn or whatever)

For simplicity, set the AutoCommit property to True and set the Isolation
property to tiReadCommitted.

Set the DefaultTransaction property of the connection object to your
transaction.

6. Drop a TIB_Query object on the form.

Set the IB_Connection property to your connection object.
Set the IB_Transaction property to your transaction object.
Set the SQL property to

SELECT * FROM EMPLOYEE

Set the KeyLinks property to EMP_NO
Set the RequestLive property to True.

7. Drop a TIB_Datasource on the form and set its Dataset property to your
query object.

8. Drop a TIB_Grid object on the form and set its Datasource property to
your datasource object.

9. Drop a TIB_NavigationBar and a TIB_UpdateBar on the form (near the top)
and set their datasource properties to your datasource object.

10. Select the Form object and go to its Events page in the Object Inspector.

Double-click on OnCreate and add the following handler code:

if not cn.Connected then
cn.Connect;
if not tr1.InTransaction then
tr1.StartTransaction;
if not IB_Query1.Active then
IB_Query1.Open;

11. Save the project.

12. Run it.

Helen