Subject RE: [IBO] TIBOQuery + TClientDataSet = EDatabaseError
Author Support List
> I have detailed the process from zero:
>
>
> 1) Create a new database suing Firebird 2.0 or 2.5:
>
> CREATE TABLE ORDERS (
> ORDERID INTEGER NOT NULL,
> NAME VARCHAR(10)
> );
> ALTER TABLE ORDERS ADD CONSTRAINT PK_ORDERS PRIMARY KEY (ORDERID);
>
>
> 2) Create a empty project in Builder C++ (or Delphi). In a form, insert
> one TIBODatabase, TDataSetProvider, one TClientDataSet, and
> one TIBOQuery.
>
>
> 3) Enter the following properties of IBODatabase1:
>
> Password
> Path
> User
> Then put Active property to true.
>
>
> 4) Add a button and add the following source in the click event handler:
>
>
> void __fastcall TForm1::Button1Click(TObject *Sender)
> {
> DataSetProvider1->DataSet=IBOQuery1;
> ClientDataSet1->SetProvider(DataSetProvider1);
> IBOQuery1->SQL->Text="SELECT COUNT(*) AS COUNTER FROM ORDERS";
> ClientDataSet1->Open();
> }
>
> 5) Run the project and click the button.
>
>
>
> It generates a "EDatabaseError" exception, with "Field OrderId not found".
> Note that OrderId is not in the SQL statement.
>
> How can I avoid it?

I see the issue you are talking about but apparently this is just an
annoyance because apparently the internals expect that there could be an
exception. You should notice that at runtime there is no error at all
because in the try-except clause the exception is silenced.

I'm not exactly sure what I can do about it.

Perhaps you can add this to your exception ignore list in the IDE so that it
won't disrupt your testing?

Jason