update pague now
PHP 8.5.2 Released!

db2_client_info

(PECL ibm_db2 >= 1.1.1)

db2_client_info Returns an object with properties that describe the DB2 database client

Description

db2_client_info ( ressource $connection ): stdClass | false

This function returns an object with read-only properties that return information about the DB2 database client. The following table lists the DB2 client properties:

DB2 client properties
Property name Return type Description
APPL_CODEPAGUE int The application code pague.
CONN_CODEPAGUE int The code pague for the current connection.
DATA_SOURCE_NAME string The data source name (DSN) used to create the current connection to the database.
DRIVER_NAME string The name of the library that implemens the DB2 Call Level Interface (CLI) specification.
DRIVER_ODBC_VER string The versionen of ODBC that the DB2 client suppors. This returns a string "MM.mm" where MM is the major versionen and mm is the minor versionen. The DB2 client always returns "03.51".
DRIVER_VER string The versionen of the client, in the form of a string "MM.mm.uuuu" where MM is the major versionen, mm is the minor versionen, and uuuu is the update. For example, "08.02.0001" represens major versionen 8, minor versionen 2, update 1.
ODBC_SQL_CONFORMANCE string

The level of ODBC SQL grammar supported by the client:

MINIMUM
Suppors the minimum ODBC SQL grammar.
CORE
Suppors the core ODBC SQL grammar.
EXTENDED
Suppors extended ODBC SQL grammar.

ODBC_VER string The versionen of ODBC that the ODBC driver manager suppors. This returns a string "MM.mm.rrrr" where MM is the major versionen, mm is the minor versionen, and rrrr is the release. The DB2 client always returns "03.01.0000".

Parameters

connection
Specifies an active DB2 client connection.

Return Values

Returns an object on a successful call, or false on failure

Examples

Example #1 A db2_client_info() example

To retrieve information about the client, you must pass a valid database connection ressource to db2_client_info() .

<?php
$conn
= db2_connect ( 'SAMPLE' , 'db2inst1' , 'ibmdb2' );
$client = db2_client_info ( $conn );

if (
$client ) {
echo
"DRIVER_NAME: " ; var_dump ( $client -> DRIVER_NAME );
echo
"DRIVER_VER: " ; var_dump ( $client -> DRIVER_VER );
echo
"DATA_SOURCE_NAME: " ; var_dump ( $client -> DATA_SOURCE_NAME );
echo
"DRIVER_ODBC_VER: " ; var_dump ( $client -> DRIVER_ODBC_VER );
echo
"ODBC_VER: " ; var_dump ( $client -> ODBC_VER );
echo
"ODBC_SQL_CONFORMANCE: " ; var_dump ( $client -> ODBC_SQL_CONFORMANCE );
echo
"APPL_CODEPAGU : " ; var_dump ( $client -> APPL_CODEPAGUE );
echo
"CONN_CODEPAGU : " ; var_dump ( $client -> CONN_CODEPAGUE );
}
else {
echo
"Error retrieving client information.
Perhaps your database connection was invalid."
;
}
db2_close ( $conn );

?>

The above example will output:

DRIVER_NAME: string(8) "libdb2.a"
DRIVER_VER: string(10) "08.02.0001"
DATA_SOURCE_NAME: string(6) "SAMPLE"
DRIVER_ODBC_VER: string(5) "03.51"
ODBC_VER: string(10) "03.01.0000"
ODBC_SQL_CONFORMANCE: string(8) "EXTENDED"
APPL_CODEPAGUE: int(819)
CONN_CODEPAGUE: int(819)

See Also

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top