Subject Re: [IBO] Newbie: "Cannot prepare a blank statement"
Author mitch_landor
Helen,

Thank you for your help. See comments below:



--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> 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:
> >
> >IBODatabase1:
> >Connected = true.
> >
> >TIBOtransaction:
> >IB_Connection = IBODatabase1
> >
> >IBOTable1:
> >IB_Connection = IBODatabase1
> >IB_transaction = tr
> >
> >When I make IBOTable1 "Active" = true I keep getting the error message
> >above.
>
> 1. Do you have a table defined in the IBOTable?

No. This has fixed it.

> 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.

If this works without, why would I ever need TIBOTransaction?

>
> >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.
>

How do I find out exactly which TIBO components must be used versus
which standard Delphi objects can be used?

I must say the IBO documentation seems very cryptic for mere mortals
to understand. It would be great if there were a short "idiots guide"
to getting up and running quickly.


> 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.


I have played with Delphi in the past but I'm very rusty.

>
> 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.
>
> Helen
>

I've done a fair bit of work with SQL in past, but again, I'm rather
rusty.

Mitch