Frank Schönheit - Sun Microsystems Germany ha scritto:
Hi Ross,

AFAIK Base converts form filter expressions into SQL queries that it sends to the backend and I assume that the sort functions are done similarly.

So, if you mean sorting text fields in database tables then, AFAIK, Base is restricted to the sorting capabilities of the backend database. That may be HSQL if you're using the native Base database backend, or it may be PostgreSQL or Oracle etc.

That's all correct.

For example, quoting the PostgreSQL documentation: "Character-string data is sorted according to the locale-specific collation order that was established when the database cluster was initialized."

It's the same for HSQLDB. Sorting is done using Java's Collator [1]. It
does make sense, usually, to handle upper and lower case as different
characters. Not doing so might have its reasoning from time to time, but
by default, you'd probably expect that the case is respected.

Collators support different strengths, and I'm pretty sure that a
strength of SECONDARY [2] would give what Franco wants - however,
there's no infrastructure in HSQL and OOo to specify a collation
strength. Having this would probably require quite some effort, since
you probably want to specify this per-column, not for the whole database.

However, now that I poked a little bit around :), I remembered the
VARCHAR_IGNORECASE data type. Franco, try changing your table so that
the column in question is of type "Text [VARCHAR_IGNORECASE]" - this
should help.

Ciao
Frank

[1]http://java.sun.com/j2se/1.5.0/docs/api/java/text/Collator.html
[2]http://java.sun.com/j2se/1.5.0/docs/api/java/text/Collator.html#SECONDARY

Hi Frank,

great! Your suggestion worked. But now I have a question more, about this. Once I have set a text field as VARCHAR_IGNORECASE, have I to pay attention to something else, when using it?

Ciao,
Franco

Ciao

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to