Subject Re: [IBO] Newbie: "Cannot prepare a blank statement"
Author Helen Borrie
At 07:21 PM 14/02/2006, you wrote:
>I'm just starting out with Delphi & evaluation of IbObjects and I want
>to stick to the TIBOxxx components. But I can't connect to a table. On
>the form I have:
>Connected = true.
>IB_Connection = IBODatabase1
>IB_Connection = IBODatabase1
>IB_transaction = tr
>When I make IBOTable1 "Active" = true I keep getting the error message

1. Do you have a table defined in the IBOTable?
2. Remove the TIBOTransaction for now. There is a default one built
into the TIBODatabase. It will be sufficient just to pick up your
IBODatabase1 for the IB_Connection property and the components will
take care of the transaction.

>Also, if I can connect to the table, how do I get a datasource for use
>in the TDBGrid?

Drop in a TDatasource from Delphi's Data Access palette and set its
Dataset property to IBOTable1.

Then set the TDBGrid's Datasource property to that Datasource.

If you are a complete newbie to data programming with Delphi, you'll
need to study the Delphi help for the VCL data access
components. The VCL equivalent of TIBOTable is TTable.

Then put "learn SQL" next in your priorities. TIBOTable will be OK
for you to cut your teeth on, using small tables such as those in
employee.fdb, but you won't get far in client/server programming
without knowing SQL.