v5:database:odbc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
database:odbc [2015/11/28 02:55] – mnewnham | v5:database:odbc [2021/01/11 09:59] (current) – typo peterdd | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ODBC ====== | ====== ODBC ====== | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | In addition to the genric | + | In addition to the generic |
----------------------- | ----------------------- | ||
===== odbc ===== | ===== odbc ===== | ||
Line 14: | Line 14: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
== Alternatives == | == Alternatives == | ||
- | [[database: | + | [[v5:database: |
</ | </ | ||
+ | * This generic driver can be used with any database with ODBC connection support. | ||
+ | * Connections can only be made using DSN connection strings or predefined ODBC connections. | ||
+ | * Performance and functionality may be limited. | ||
+ | * Writing portable applications that use this driver is not recommended. | ||
+ | * When configuring connections on Windows, ensure that the ODBC driver configuration (32 Bit/64 Bit) matches the installed PHP version. | ||
+ | ==== Setting The Cursor Mode ==== | ||
+ | All ADOdb ODBC drivers can configure an appropriate cursor mode. The following modes are available through PHP. | ||
+ | * SQL_CUR_USE_IF_NEEDED | ||
+ | * SQL_CUR_USE_ODBC | ||
+ | * SQL_CUR_USE_DRIVER | ||
+ | The cursor is set by setting the '' | ||
+ | <code php> | ||
+ | include ' | ||
+ | $db = newAdoConnection(' | ||
+ | |||
+ | $db-> | ||
+ | |||
+ | $db-> | ||
+ | </ | ||
+ | |||
+ | |||
------------------------------ | ------------------------------ | ||
- | ====== odbc_mssql | + | ===== odbc_mssql ===== |
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
== Specification == | == Specification == | ||
Line 28: | Line 49: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
== Alternatives == | == Alternatives == | ||
- | [[database: | + | [[v5:database: |
</ | </ | ||
+ | When used on Windows clients, this driver needs the Microsoft SQL server native client. There are feature limitations compared to the '' | ||
+ | ------------------------------------ | ||
+ | ===== odbc_mssql2012 ===== | ||
+ | <WRAP right box round 300px> | ||
+ | == From ADOdb V5.21 == | ||
+ | == Specification == | ||
+ | ^Driver Name|odbc_mssql2012| | ||
+ | ^Data Provider|odbc| | ||
+ | ^Status|Active((This driver is actively supported by ADOdb project members))| | ||
+ | ^Windows|Yes| | ||
+ | ^Unix|No| | ||
+ | ^ADOdb V5|Yes| | ||
+ | ^ADOdb V6|Yes| | ||
+ | </ | ||
+ | When used with SQL Server 2012, concatenation of strings results in a different behaviour compared with earlier versions. [[http:// | ||
--------------------------- | --------------------------- | ||
===== odbc_oracle ===== | ===== odbc_oracle ===== | ||
Line 43: | Line 78: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
</ | </ | ||
- | --------------------------- | + | --------------------------------------------- |
- | ===== odbc_db2 | + | After connection, the date format is automatically set **by the driver** by executing the following statement: |
+ | <code php> | ||
+ | $sql = "ALTER SESSION SET NLS_DATE_FORMAT=' | ||
+ | $db-> | ||
+ | </ | ||
+ | ----------------------------------- | ||
+ | ==== odbc_db2 | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
== Specification == | == Specification == | ||
^Driver Name|odbc_db2| | ^Driver Name|odbc_db2| | ||
^Data Provider|odbc| | ^Data Provider|odbc| | ||
- | ^Status|Inactive((This driver is not supported by ADOdb project members))| | + | ^Status|Inactive((This driver is not actively |
^Windows|Yes| | ^Windows|Yes| | ||
^Unix|No| | ^Unix|No| | ||
^ADOdb V5|Yes| | ^ADOdb V5|Yes| | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
+ | == Alternatives == | ||
+ | [[v5: | ||
+ | </ | ||
+ | Connects to DB2 database using either the IBM or 3rd party ODBC driver | ||
+ | ------------------------------------------ | ||
+ | <WRAP tip> | ||
+ | If the driver supports it setting the Cursor Type to '' | ||
+ | </ | ||
+ | <WRAP tip> | ||
+ | == USING CLI INTERFACE == | ||
+ | |||
+ | There were reports that the $host and $database params have to be reversed in Connect() when using the CLI interface. | ||
+ | </ | ||
+ | |||
+ | <WRAP tip> | ||
+ | == System Error 5 == | ||
+ | IF you get a System Error 5 when trying to Connect/ | ||
+ | to DB2 full rights to the DB2 SQLLIB directory, and place the user in the DBUSERS group. | ||
+ | |||
</ | </ | ||
- | This driver was originally the main connection to [[database: | ||
------------------------------------------------- | ------------------------------------------------- | ||
===== Feature Limitations ===== | ===== Feature Limitations ===== | ||
- | ODBC connections have functionality limitations include transactional handling. See the [[database: | + | ODBC connections have functionality limitations include transactional handling. See the [[v5:database: |
- | {{tag> | + | {{tag> |
v5/database/odbc.txt · Last modified: 2021/01/11 09:59 by peterdd