Files
doc-en/reference/uodbc/reference.xml
2002-07-28 13:26:38 +00:00

287 lines
7.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<reference id="ref.odbc">
<title>Unified ODBC functions</title>
<titleabbrev>ODBC</titleabbrev>
<partintro>
<section id="odbc.intro">
&reftitle.intro;
<para>
In addition to normal ODBC support, the Unified ODBC functions in
PHP allow you to access several databases that have borrowed the
semantics of the ODBC API to implement their own API. Instead of
maintaining multiple database drivers that were all nearly
identical, these drivers have been unified into a single set of
ODBC functions.
</para>
<para>
The following databases are supported by the Unified ODBC
functions: <ulink url="&url.adabas;">Adabas D</ulink>,
<ulink url="&url.ibmdb2;">IBM DB2</ulink>,
<ulink url="&url.iodbc;">iODBC</ulink>,
<ulink url="&url.solid;">Solid</ulink>, and
<ulink url="&url.sybase;">Sybase SQL Anywhere</ulink>.
</para>
<note>
<para>
There is no ODBC involved when connecting to the above
databases. The functions that you use to speak natively to them
just happen to share the same names and syntax as the ODBC
functions. The exception to this is iODBC. Building PHP with iODBC
support enables you to use any ODBC-compliant drivers with your PHP
applications. iODBC is maintained by <ulink url="&url.openlink;">
OpenLink Software</ulink>. More information on iODBC, as well as a
HOWTO, is available at <ulink url="&url.iodbc;">www.iodbc.org</ulink>.
</para>
</note>
</section>
<section id="odbc.requirements">
&reftitle.required;
<para>
To access any of the supported databases you need to have
the required libraries installed.
</para>
</section>
<section id="odbc.installation">
&reftitle.install;
<para>
Please see the <link
linkend="install.configure.options.databases">Database installation
options</link> chapter for more information about configuring PHP
with these databases.
</para>
</section>
<section id="odbc.configuration">
&reftitle.runtime;
<para>
The behaviour of the ODBC functions is affected by settings in the
global <link linkend="configuration.file">configuration file</link> &php.ini;.
<table>
<title>Unified ODBC Configuration Options</title>
<tgroup cols="3">
<thead>
<row>
<entry>Name</entry>
<entry>Default</entry>
<entry>Changeable</entry>
</row>
</thead>
<tbody>
<row>
<entry>odbc.default_db *</entry>
<entry>NULL</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>odbc.default_user *</entry>
<entry>NULL</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>odbc.default_pw *</entry>
<entry>NULL</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>odbc.allow_persistent</entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
</row>
<row>
<entry>odbc.check_persistent</entry>
<entry>"1"</entry>
<entry>PHP_INI_SYSTEM</entry>
</row>
<row>
<entry>odbc.max_persistent</entry>
<entry>"-1"</entry>
<entry>PHP_INI_SYSTEM</entry>
</row>
<row>
<entry>odbc.max_links</entry>
<entry>"-1"</entry>
<entry>PHP_INI_SYSTEM</entry>
</row>
<row>
<entry>odbc.defaultlrl</entry>
<entry>"4096"</entry>
<entry>PHP_INI_ALL</entry>
</row>
<row>
<entry>odbc.defaultbinmode</entry>
<entry>"1"</entry>
<entry>PHP_INI_ALL</entry>
</row>
</tbody>
</tgroup>
</table>
<note>
<simpara>
Entries marked with * are not implemented yet.
</simpara>
</note>
For further details and definition of the PHP_INI_* constants see
<function>ini_set</function>.
</para>
<para>
Here is a short explanation of the configuration directives.
<variablelist>
<varlistentry id="ini.uodbc.default-db">
<term>
<parameter>odbc.default_db</parameter>
<type>string</type>
</term>
<listitem>
<para>
ODBC data source to use if none is specified in
<function>odbc_connect</function> or
<function>odbc_pconnect</function>.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.default-user">
<term>
<parameter>odbc.default_user</parameter>
<type>string</type>
</term>
<listitem>
<para>
User name to use if none is specified in
<function>odbc_connect</function> or
<function>odbc_pconnect</function>.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.default-pw">
<term>
<parameter>odbc.default_pw</parameter>
<type>string</type>
</term>
<listitem>
<para>
Password to use if none is specified in
<function>odbc_connect</function> or
<function>odbc_pconnect</function>.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.allow-persistent">
<term>
<parameter>odbc.allow_persistent</parameter>
<type>boolean</type>
</term>
<listitem>
<para>
Whether to allow persistent ODBC connections.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.check-persistent">
<term>
<parameter>odbc.check_persistent</parameter>
<type>boolean</type>
</term>
<listitem>
<para>
Check that a connection is still valid before reuse.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.max-persistent">
<term>
<parameter>odbc.max_persistent</parameter>
<type>integer</type>
</term>
<listitem>
<para>
The maximum number of persistent ODBC connections per process.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.max-links">
<term>
<parameter>odbc.max_links</parameter>
<type>integer</type>
</term>
<listitem>
<para>
The maximum number of ODBC connections per process, including
persistent connections.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.defaultlrl">
<term>
<parameter>odbc.defaultlrl</parameter>
<type>integer</type>
</term>
<listitem>
<para>
Handling of LONG fields. Specifies the number of bytes returned to
variables.
</para>
</listitem>
</varlistentry>
<varlistentry id="ini.uodbc.defaultbinmode">
<term>
<parameter>odbc.defaultbinmode</parameter>
<type>integer</type>
</term>
<listitem>
<para>
Handling of binary data.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
<section id="odbc.resources">
&reftitle.resources;
&no.resource;
</section>
&reference.uodbc.constants;
</partintro>
&reference.uodbc.functions;
</reference>
<!-- 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
-->