v5:database:ibm_db2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:database:ibm_db2 [2016/01/13 02:06] – ↷ Links adapted because of a move operation mnewnham | v5:database:ibm_db2 [2024/05/25 04:30] (current) – [Connection Example Using DSN] mnewnham | ||
---|---|---|---|
Line 10: | Line 10: | ||
^ADOdb V5|Yes| | ^ADOdb V5|Yes| | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
+ | |||
== Alternative Drivers == | == Alternative Drivers == | ||
[[v5: | [[v5: | ||
+ | == See Also == | ||
+ | [[v5: | ||
</ | </ | ||
===== Description ===== | ===== Description ===== | ||
- | This driver provides a connection to IBM DB2 Databases, using the IBM Data Client. This driver replaces the original [[v5: | + | This driver provides a connection to IBM DB2 Databases, using the IBM Data Client. This driver replaces the original [[v5: |
+ | == PHP Drivers For Windows == | ||
+ | PHP 7 and 8 drivers for windows are currently available [[https:// | ||
---------------------------------- | ---------------------------------- | ||
==== uCaseTables ==== | ==== uCaseTables ==== | ||
Line 41: | Line 47: | ||
The DB2 database must be catalogued for a connection like this to work. | The DB2 database must be catalogued for a connection like this to work. | ||
</ | </ | ||
+ | ==== Building a catalog entry ==== | ||
+ | This is a simple example building a catalogued connection from a windows client to a remote DB2 server running on a machine named adodb-db2.local. The server is running on port 25010. We will add a DSN entry called // | ||
+ | |||
+ | < | ||
+ | db2cli writecfg add -database SAMPLE -host adodb-db2.local -port 25010 | ||
+ | db2cli writecfg add -dsn adodb-test -database SAMPLE -host adodb-db2.local -port 25010 | ||
+ | </ | ||
+ | To use this DSN | ||
<code php> | <code php> | ||
include ' | include ' | ||
- | $database | + | $dsn = 'adodb-test'; |
$user = ' | $user = ' | ||
$password = ' | $password = ' | ||
$conn = ADOnewConnection(' | $conn = ADOnewConnection(' | ||
- | $conn-> | + | $conn-> |
</ | </ | ||
Line 53: | Line 67: | ||
<code php> | <code php> | ||
include ' | include ' | ||
- | $dsn = ' | + | $dsn = ' |
$conn = ADOnewConnection(' | $conn = ADOnewConnection(' | ||
$conn-> | $conn-> | ||
+ | </ | ||
+ | |||
+ | ------------------------------ | ||
+ | ===== Connection Example Using *LOCAL ===== | ||
+ | <code php> | ||
+ | include ' | ||
+ | $dsn = ' | ||
+ | $conn = ADOnewConnection(' | ||
+ | $conn-> | ||
+ | |||
+ | /* | ||
+ | * Add another connection | ||
+ | */ | ||
+ | $dsn = ' | ||
+ | $conn2 = ADOnewConnection(' | ||
+ | $conn2-> | ||
+ | ------------------------------ | ||
</ | </ | ||
Line 64: | Line 95: | ||
^Driver Name|db2oci| | ^Driver Name|db2oci| | ||
^Data Provider|db2| | ^Data Provider|db2| | ||
- | ^Status|Active((This driver is actively supported by ADOdb project members))| | + | ^Status|Deprecated((This driver is deprecated as of ADOdb version 5.21 and will be removed in ADOdb version 6))| |
^Windows|Yes| | ^Windows|Yes| | ||
^Unix|Yes| | ^Unix|Yes| | ||
^ADOdb V5|Yes| | ^ADOdb V5|Yes| | ||
- | ^ADOdb V6|Yes| | + | ^ADOdb V6|No| |
</ | </ | ||
- | This driver re-maps ibm :0 bind variables to oracle compatible ? variables. Use this driver to enhance compatiblity between [[v5: | + | This driver re-maps ibm :0 bind variables to oracle compatible ? variables. Use this driver to enhance compatiblity between [[v5: |
+ | |||
+ | The driver is deprecated. To write portable code that uses bind parameters and can be shared between DB2 and Oracle, use the [[v5: | ||
------------------------------------------------- | ------------------------------------------------- | ||
Line 87: | Line 120: | ||
</ | </ | ||
This driver provides undocumented bind variable mapping from ibm to oracle.The functionality appears to overlap the db2_oci driver | This driver provides undocumented bind variable mapping from ibm to oracle.The functionality appears to overlap the db2_oci driver | ||
- | {{tag> | + | {{tag> |
===== Case Sensitivity In Table And Column Names ===== | ===== Case Sensitivity In Table And Column Names ===== |
v5/database/ibm_db2.1452647181.txt.gz · Last modified: 2017/04/21 11:25 (external edit)