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 [2023/01/23 01:36] – mnewnham | v5:database:ibm_db2 [2025/06/01 13:21] (current) – Remove square brackets in tags dregad | ||
---|---|---|---|
Line 47: | 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 59: | 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 95: | 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>[ibm db2 tier1]}} | + | {{tag> |
===== Case Sensitivity In Table And Column Names ===== | ===== Case Sensitivity In Table And Column Names ===== | ||
Line 129: | Line 154: | ||
- | {{tag>[db2 supported]}} | + | {{tag> |
v5/database/ibm_db2.1674434186.txt.gz · Last modified: by mnewnham