Subject Re: [firebird-support] Using Firebird with SyBase PowerBuilder 8
Author Helen Borrie
Hello Emerson,

At 08:45 AM 25/01/2005 -0800, you wrote:

>Hi,
>
>Sorry, my English is not very well, but you can correct me any time :-)

There are two Portuguese-language lists, if that would help, see
http://firebird.sourceforge.net/index.php?op=lists

>
>I use the PowerBuilder 8, and now I want use the Firebird SQL, but I find
>out, here in Brazil this:
>
>"The PB sends the SQL solicitation, either of DataWindow (DW) or SQL in
>script of the PB, in uppercase, except for the values of arguments
>repassed for retrieve or that they meet between ` (apostrophes) indicated
>as values of field.

The "solution" here is: do not define database objects (tables, fields,
procedures, triggers, domains, or anything else) or variables using quoted
identifiers. Some tools do this by default. Do not use any tool that does
not allow you to disable this "feature".

> To prevent any inconveniences, is suggested to create the data bank
> using uppercase, for all the elements of the bank: tables, fields,
> constraints, etc.

As above. If you avoid quoted identifiers, Firebird automatically stores
all identifiers in uppercase.

> The use of datatype NUMERIC or DECIMAL complicates in some reactions in
> scripts of the PB, resulting in missed calculations, incorrect and worse
> taking of values that this: To decide these problems found in the use of
> this datatypes could be supplied using type FLOAT."

This "problem" is a question of craft - understanding how numbers behave in
calculations. Developers should always understand that NUMERIC and DECIMAL
are fixed numeric types, and should take care to write applications and
procedures that protect the results of calculations from errors of scale
and precision.

Sometimes the solution is to use a floating point type; however, if you do
so, in general you should cast your numbers to and from DOUBLE PRECISION,
not FLOAT. However, the choice of a number type for storing a particular
kind of numeric value is important. If you do not understand the
differences, consult your Portuguese expert lists carefully.

>
>Anybody here use the PB with Firebird and can give me a help? I need use
>the Firebird and I cant make mistakes :-)

The best advice is TEST, TEST, TEST!! Never be satisfied, just because
something "looks right". Write test cases BEFORE you begin, and test
everything.

./hb