Subject Re: Char set & collation order ... I'm lost!
Author didiergm
You're right paul, this is a nice way to do it. What go me at the
beginnning is that I was facing too many options without the proper
knowledge to understand them ... and I went flat on the wall!

I'll do some testing with the collation order and let you know the

Thanks for your help,


PS as far as I know. dynamic sql is pretty standard, a few functions
will vary but nothing you cannot do with a nice routine constructing
the sql request.

Now a BIG difference is stored procedures and the way you call them
from your code:

firebird select * from my_proc ---> in delphi this is a query object
Sybase EXEC My_proc ----> in delphi this is a SP object
Oracle Exec My_proc + specific call to read the result from the server

--- In ib-support@y..., "Paul Schmidt" <paul@t...> wrote:
> One thing I find useful, for supporting different engines are
> for example some engines support a boolean type, others do not,
> so you create a domain called D_BOOL (D_ meaning it's a domain,
> so if the engine later adds a bool type, you don't have to rewrite
> code). For engines that have a bool type, it becomes:
> create domain D_BOOL as boolean
> for IB/FB you do this:
> create domain D_BOOL as integer DEFAULT 0 CHECK (VALUE IN
> (0,1)) not null;
> This effectively creates a boolean type, although it uses more
> storage then it needs to.
> So fields that may be entered as English or French (I'm in Canada),
> I define using a set of domains I call D_BICHAR_length here are a
> few examples:
> create domain D_BICHAR_11 as varchar(11) character set
> WIN1252 collate PXW_INTL850;
> create domain D_BICHAR_31 as varchar(31) character set
> WIN1252 collate PXW_INTL850;
> create domain D_BICHAR_51 as varchar(51) character set
> WIN1252 collate PXW_INTL850;
> This should in theory mean that aàáâãäAÀÁÂÃÄ should all be
> considered the same character for sortation purposes. You need
> to do your own testing however, to make sure this works for you.
> The simplest way, is to create a small table, then stuff it with
> characters, then do an order by, to make sure it works for you.
> Make sure you load the table out of order so that it needs to
> reorder it properly to get it to work,
> This also gets you past the other engines because II don't know
> Sybase (well) and I don't know Oracle, but if the same mechanism
> is available it's going to work differently, so ultimately you will
> probably enf up with different SQL anyway. However if they support
> domains, then this goes a long way towards getting them
> compatable.
> Paul
> Paul Schmidt
> Tricat Technologies
> paul@t...