RE: [PEAR] [MDB] Case sensitivity / Oracle table and field name.
| From: | Lukas Smith | Date: | Thu, 02 Oct 2003 12:23:45 +0000 |
| Subject: | RE: [PEAR] [MDB] Case sensitivity / Oracle table and field name. | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8227@lists.php.net to get a copy of this message | ||
> From: Thierry Bothorel [mailto:thierry.bo@netcourrier.com]
> Sent: Tuesday, September 09, 2003 7:35 PM
> As I don't have the ability to test it myself with Oracle, I would
like to
> know how Oracle driver send queries to the server?
>
> I want my scripts to run on all MDB supported databases, and
previously
> all
> my sql statements use lower case for table and field name. However
Oracle
> database server converts all database object names to uppercase
> characters,
> except if they are enclosed in double quotation marks.
>
> So how does Oracle driver handle this :
>
> CREATE TABLE table_name
>
> Does it just send CREATE TABLE table_name, then the table name will be
> TABLE_NAME, or CREATE TABLE "table_name", then creating a lower case
> table
> name?
>
> If this is the first case, then I will have to change all my table and
> field
> name to upper case to be sure the same sql statements will work with
all
> DBMS.
In MDB 1.x we have the following situation:
This is not handled. I don't want to change this in MDB 1.x, because its
will just break code.
Ok in MDB 2.x we have the following solution:
All array keys in assoc result are lowercased in both interbase and
oracle by the respective drivers. This means that people who want their
code to work on all RDBMS should always lowercase their field names.
Regards,
Lukas