1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- Generated by xml_proto.php v2.3. Found in /scripts directory of phpdoc. -->
<refentry id="function.db2-client-info">
<refnamediv>
<refname>db2_client_info</refname>
<refpurpose>Returns an object with properties that describe the DB2 database client</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>object</type><methodname>db2_client_info</methodname>
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
</methodsynopsis>
<para>
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:
<table>
<title>DB2 client properties</title>
<tgroup cols="3">
<thead>
<row>
<entry>Property name</entry>
<entry>Return type</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>APPL_CODEPAGE</entry>
<entry>int</entry>
<entry>The application code page.</entry>
</row>
<row>
<entry>CONN_CODEPAGE</entry>
<entry>int</entry>
<entry>The code page for the current connection.</entry>
</row>
<row>
<entry>DATA_SOURCE_NAME</entry>
<entry>string</entry>
<entry>The data source name (DSN) used to create the current connection
to the database.</entry>
</row>
<row>
<entry>DRIVER_NAME</entry>
<entry>string</entry>
<entry>The name of the library that implements the DB2 Call
Level Interface (CLI) specification.</entry>
</row>
<row>
<entry>DRIVER_ODBC_VER</entry>
<entry>string</entry>
<entry>The version of ODBC that the DB2 client supports. This returns a
string "MM.mm" where <varname>MM</varname> is the major version and
<varname>mm</varname> is the minor version. The DB2 client always
returns "03.51".
</entry>
</row>
<row>
<entry>DRIVER_VER</entry>
<entry>string</entry>
<entry>The version of the client, in the form of a string "MM.mm.uuuu" where
<varname>MM</varname> is the major version,
<varname>mm</varname> is the minor version,
and <varname>uuuu</varname> is the update. For example, "08.02.0001"
represents major version 8, minor version 2, update 1.
</entry>
</row>
<row>
<entry>ODBC_SQL_CONFORMANCE</entry>
<entry>string</entry>
<entry>The level of ODBC SQL grammar supported by the client:
<variablelist>
<varlistentry>
<term>MINIMUM</term>
<listitem>
<para>
Supports the minimum ODBC SQL grammar.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>CORE</term>
<listitem>
<para>
Supports the core ODBC SQL grammar.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>EXTENDED</term>
<listitem>
<para>
Supports extended ODBC SQL grammar.
</para>
</listitem>
</varlistentry>
</variablelist>
</entry>
</row>
<row>
<entry>ODBC_VER</entry>
<entry>string</entry>
<entry>The version of ODBC that the ODBC driver manager supports. This
returns a string "MM.mm.rrrr" where <varname>MM</varname> is the major
version, <varname>mm</varname> is the minor version, and
<varname>rrrr</varname> is the release. The DB2 client always returns
"03.01.0000".
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>connection</parameter></term>
<listitem>
<para>
Specifies an active DB2 client connection.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an object on a successful call. Returns &false; on failure.
</para>
</refsect1>
<!-- Use when ERRORS exist
<refsect1 role="errors">
&reftitle.errors;
<para>
When does this function throw E_* level errors, or exceptions?
</para>
</refsect1>
-->
<!-- Use when a CHANGELOG exists
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>Enter the PHP version of change here</entry>
<entry>Description of change</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
-->
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>A <function>db2_client_info</function> example</title>
<para>
To retrieve information about the client, you must pass a valid
database connection resource to <function>db2_client_info</function>.
</para>
<programlisting role="php">
<![CDATA[<?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_CODEPAGE: "; var_dump( $client->APPL_CODEPAGE );
echo "CONN_CODEPAGE: "; var_dump( $client->CONN_CODEPAGE );
}
else {
echo "Error retrieving client information.
Perhaps your database connection was invalid.";
}
db2_close($conn);
?>]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
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_CODEPAGE: int(819)
CONN_CODEPAGE: int(819)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>db2_server_info</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
|