Subject Re: [IBO] FieldsDisplayFormat
Author Helen Borrie
At 02:42 PM 29/08/2005 +0700, you wrote:
>Helen ...
>I would like to give my salute of your quick response.
>Thanks a lot.
>Attachment is my zip file of "CSdemo" sample code + employee.gdb

The list doesn't accept attachments.

However, I recommend that you abandon that CSDemos project. Having looked
at it, I see that all it is, is someone's conversion of the same equally
bad code written for the BDE by some Borland support person more than a
decade ago. There is nothing in that project that is of use in learning
IBO (or for writing good DB applications with *any* tool!)

Your problem no doubt came from some combination of database version, IBO
and client library. I could not reproduce *that* problem by running the
project; but I got two different exceptions under two different
conditions, depending on whether I connected to the IB 5 database that the
application points to (in Common Files\Borland\data) and the Firebird 1.5
database (in Firebird's \examples folder). I am using Delphi 7, IBO 4.5B
and Fb 1.5.2.

In short, please just avoid this demo project. Jason, if you are watching
this, I recommend you get rid of it. Amongst other things, it contains SQL
that doesn't pass Fb 1.5's ambiguity rules.

FWIW, I think your exception was probably thrown by the CHECK constraints
in the SALARY_HISTORY table. They check that the newly calculated value of
PERECENT_CHANGE is > -50 and < 50. Since the column PERCENT_CHANGE is a
double precision, I think there may be conditions where the engine will
complain about comparing the integers (-50, 50) with the floating point number.