php8.5
Home/ Manual/ reference / pdo_odbc/ The Pdo\Odbc class

The Pdo\Odbc class

A PDO subclass representing a connection using the ODBC PDO driver.

Intro

A PDO subclass representing a connection using the ODBC PDO driver.

Class synopsis

PdoOdbcextendsPDOInheritedConstantsConstantspublicconstintPdo\Odbc::ATTR_USE_CURSOR_LIBRARYpublicconstintPdo\Odbc::ATTR_ASSUME_UTF8publicconstintPdo\Odbc::SQL_USE_IF_NEEDEDpublicconstintPdo\Odbc::SQL_USE_DRIVERpublicconstintPdo\Odbc::SQL_USE_ODBCInheritedMethods

Predefined Constants

Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY

This option controls whether the ODBC cursor library is used. The ODBC cursor library supports some advanced ODBC features (e.g. block scrollable cursors), which may not be implemented by the driver. The following values are supported:

Pdo\Odbc::SQL_USE_IF_NEEDED

Use the ODBC cursor library when needed. This is the default.

Pdo\Odbc::SQL_USE_DRIVER

Never use the ODBC cursor library.

Pdo\Odbc::SQL_USE_ODBC

Always use the ODBC cursor library.

Pdo\Odbc::ATTR_ASSUME_UTF8

Windows only. If true, UTF-16 encoded character data (CHAR, VARCHAR and LONGVARCHAR) is converted to UTF-8 when reading from or writing data to the database. If false (the default), character encoding conversion may be done by the driver.

Source: reference/pdo_odbc/pdo-odbc.xml · from the official PHP manual (php/doc-en)