- skip to content

# Database Abstraction Layer

### User Tools

- Login

### Site Tools

- Recent changes
- Media Manager
- Sitemap

### Sidebar

##### Resources

- Reference Manual
- User Guide
- The Data Dictionary
- ADOdb-xmlschema
- ADOdb Active Record
- Performance Monitoring
- Date/Time Library
- Session Management Library
- Unsupported Addons
- Coding Standards

##### Supported Databases

- Access
- ADO
- CSV
- Firebird
- Frontbase
- IBM DB2
- Informix
- Interbase
- LDAP
- Microsoft SQL Server
- MySQL
- Netezza
- ODBC
- ODBTP
- Oracle
- PDO
- Postgresql
- SAP ADS
- SAP ASE
- SAP Maxdb
- SAP Sqlanywhere
- Sqlite
- Sybase
- Plain Text
- Visual Foxpro

##### Other

- Feature Comparison Matrix
- Connection Matrix
- Include File Guide

v5:dictionary:settablecasing

# setTableCasing

##### See Also

getTableCasing()

##### Syntax From ADOdb 6.0 *

    void setTableCasing(
        int $caseOption
        )

* This feature is supported in the IBM DB2 driver from version 5.21.0

## Description

`setTableCasing()` is a helper method that automatically converts any table name provided to a metaFunction to the specified case. This is mostly important to a DBMS where table names are case-sensitive. The method can be called multiple times during a program.

## Options

The following options are available

Constant | Value | Description
--- | --- | ---
TABLECASE_LOWER | 0 | Table names are converted to lower case
TABLECASE_UPPER | 1 | Table names are converted to upper case
TABLECASE_DEFAULT | 2 | No case conversion on input table names is performed

The default value is TABLECASE_DEFAULT.

## Usage

    /*
     * Connection to DB2 database assumed
    */

    $db->setTableCasing($db::TABLECASE_UPPER);
    $r = $db->metaColumnNames('Act');
    /*
     * table casing automatically converts to 'ACT'
     *
     *returns

    Array(
    [0] => ACTNO,
    [1] => ACTDESC
    )
    */

    $db->setTableCasing($db::TABLECASE_LOWER);
    $r = $db->metaColumnNames('Act');
    /*
     * table casing automatically converts to 'act'
     *
     * because DB2 is case-sensitive, it returns

    Array(
    )
    */

v5/dictionary/settablecasing.txt · Last modified: 2016/01/12 17:06 by mnewnham

### Page Tools

- Show pagesource
- Old revisions
- Backlinks
- Rename Page
- Back to top