Subject Re: [firebird-support] Problem of database migration : case sensitivity
Author Martijn Tonies
Hi,

> I'm trying to migrate the database (ASA 8.0) of a big application on a
> Firebird database (thanks to Firebird 1.5 and Firebird ODBC driver 1.2),
> but I have some problems, if you could help me...
>
>
> In this application, I have several kinds of SQL statements : tables names
> and fields names are in lower case, with "" or not.
>
> For instance:
> select "firstname" from "client"; (1)
> OR select firstname from client; (2)
>
>
> If I create my Firebird tables with specifying the name in lower case and
> in " ", only statements of kind (1) runs.
> If I create them without " " and in lower case, only the statement (2)
run.
>
> I know that Firebird is case insensitive if we create our objects with
> their name without " ". Their name are automatically converted in upper
> case, and that's why I think that the statement 1 can't run int this case.

"CLIENT" will run as well. Would that be a possibility?

> I wonder whether we can create objects in Firebird whose name would be in
> lower case and WITHOUT USING "".
>
> I MUSTN'T CHANGE the statements of my application. Does it exist an other
> solution?

Well, not if you have these quotes and non-quotes mixed.

The totally ugly solution would be creating views:

create table client ...

create view "client" ...

But, as I said: that is really really ugly.

> I've seen that some options are configurable on the driver ODBC for the
> case sensitivity, but I am not able to make them function. I don't know if
> it could run...

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com