Subject | Re: [IBO] Firebird and IB Objects |
---|---|
Author | Helen Borrie |
Post date | 2006-05-12T09:00:30Z |
At 05:15 PM 12/05/2006, you wrote:
and you don't care about security at this point.
1. drop an ib_connection on your form
2. Set the following properties:
Name: cn1
Server: localhost
Path: c:\Program Files\Firebird\Firebird_1_5\examples\employee.fdb
Protocol: cpTCP_IP
Username: SYSDBA
Password: masterkey
PasswordStorage: psNotSecure
That's it. Of course, you won't see anything unless you hook up a
query to your connection. So, let's look at the Employee table (ROUGH!!)
1. Drop an IB_Query on your form.
2. Set properties:
SQL: select * from employee
IB_Connection: [select cn1]
IB_Transaction: [select <default>}
And you will want a datasource and some controls so you can look at the data:
1. Drop an IB_Datasource on your form. Set its Dataset property to IB_Query1.
2. Drop an IB_Grid on your form. Set its Datasource property to
IB_Datasource1.
3. Drop an IB_NavigationBar on the form and set its Datasource
property to IB_Datasource1.
Now, you want some code to get it all going. In your form's OnShow event:
begin
if not cn1.Connected then
cn1.Connect;
if not IB_Query1.Active then
IBQuery1.Open;
end;
Run this and you should see the Employee data.
Helen
>Hello group, I have a newbie question, I tried to search on the websiteSuppose you want to connect to employee.fdb in its default location
>but could not find...
>
>How can I connect a IB_Connection to a Firebird database?
and you don't care about security at this point.
1. drop an ib_connection on your form
2. Set the following properties:
Name: cn1
Server: localhost
Path: c:\Program Files\Firebird\Firebird_1_5\examples\employee.fdb
Protocol: cpTCP_IP
Username: SYSDBA
Password: masterkey
PasswordStorage: psNotSecure
That's it. Of course, you won't see anything unless you hook up a
query to your connection. So, let's look at the Employee table (ROUGH!!)
1. Drop an IB_Query on your form.
2. Set properties:
SQL: select * from employee
IB_Connection: [select cn1]
IB_Transaction: [select <default>}
And you will want a datasource and some controls so you can look at the data:
1. Drop an IB_Datasource on your form. Set its Dataset property to IB_Query1.
2. Drop an IB_Grid on your form. Set its Datasource property to
IB_Datasource1.
3. Drop an IB_NavigationBar on the form and set its Datasource
property to IB_Datasource1.
Now, you want some code to get it all going. In your form's OnShow event:
begin
if not cn1.Connected then
cn1.Connect;
if not IB_Query1.Active then
IBQuery1.Open;
end;
Run this and you should see the Employee data.
Helen