<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.database.abstract.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'book.uodbc.php',
    1 => 'ODBC',
    2 => 'ODBC (Unified)',
  ),
  'up' => 
  array (
    0 => 'refs.database.abstract.php',
    1 => '数据库抽象层',
  ),
  'prev' => 
  array (
    0 => 'function.dba-sync.php',
    1 => 'dba_sync',
  ),
  'next' => 
  array (
    0 => 'uodbc.setup.php',
    1 => '安装/配置',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/uodbc/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.uodbc.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.uodbc" class="book">
 
 <h1 class="title">ODBC (Unified)</h1>
 
 
 
 <div id="intro.uodbc" class="preface">
  <h1 class="title">简介</h1>
  <p class="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.
  </p>
  <p class="para">
   The following databases are supported by the Unified ODBC
   functions: <a href="http://www.adabas.com/" class="link external">&raquo;&nbsp;Adabas D</a>,
   <a href="http://www-306.ibm.com/software/data/db2/" class="link external">&raquo;&nbsp;IBM DB2</a>,
   <a href="http://www.iodbc.org/" class="link external">&raquo;&nbsp;iODBC</a>,
   <a href="http://www.solidtech.com/" class="link external">&raquo;&nbsp;Solid</a>, and
   <a href="http://www.sybase.com/" class="link external">&raquo;&nbsp;Sybase SQL Anywhere</a>.
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    With the exception of iODBC, 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. However, building PHP 
    with iODBC support enables you to use any ODBC-compliant 
    drivers with your PHP applications. More information on iODBC,
    is available at <a href="http://www.iodbc.org/" class="link external">&raquo;&nbsp;www.iodbc.org</a>
    with the alternative unixODBC available at 
    <a href="http://www.unixodbc.org/" class="link external">&raquo;&nbsp;www.unixodbc.org</a>.
   </p>
  </p></blockquote>
 </div>
 
 
 







 




 







<ul class="chunklist chunklist_book"><li><a href="uodbc.setup.php">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="uodbc.requirements.php">需求</a></li><li><a href="odbc.installation.php">安装</a></li><li><a href="odbc.configuration.php">运行时配置</a></li><li><a href="uodbc.resources.php">资源类型</a></li></ul></li><li><a href="uodbc.constants.php">预定义常量</a></li><li><a href="ref.uodbc.php">ODBC 函数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.odbc-autocommit.php">odbc_autocommit</a> — Toggle autocommit behaviour</li><li><a href="function.odbc-binmode.php">odbc_binmode</a> — Handling of binary column data</li><li><a href="function.odbc-close.php">odbc_close</a> — Close an ODBC connection</li><li><a href="function.odbc-close-all.php">odbc_close_all</a> — Close all ODBC connections</li><li><a href="function.odbc-columnprivileges.php">odbc_columnprivileges</a> — Lists columns and associated privileges for the given table</li><li><a href="function.odbc-columns.php">odbc_columns</a> — Lists the column names in specified tables</li><li><a href="function.odbc-commit.php">odbc_commit</a> — Commit an ODBC transaction</li><li><a href="function.odbc-connect.php">odbc_connect</a> — Connect to a datasource</li><li><a href="function.odbc-connection-string-is-quoted.php">odbc_connection_string_is_quoted</a> — Determines if an ODBC connection string value is quoted</li><li><a href="function.odbc-connection-string-quote.php">odbc_connection_string_quote</a> — Quotes an ODBC connection string value</li><li><a href="function.odbc-connection-string-should-quote.php">odbc_connection_string_should_quote</a> — Determines if an ODBC connection string value should be quoted</li><li><a href="function.odbc-cursor.php">odbc_cursor</a> — Get cursorname</li><li><a href="function.odbc-data-source.php">odbc_data_source</a> — Returns information about available DSNs</li><li><a href="function.odbc-do.php">odbc_do</a> — 别名 odbc_exec</li><li><a href="function.odbc-error.php">odbc_error</a> — Get the last error code</li><li><a href="function.odbc-errormsg.php">odbc_errormsg</a> — Get the last error message</li><li><a href="function.odbc-exec.php">odbc_exec</a> — Directly execute an SQL statement</li><li><a href="function.odbc-execute.php">odbc_execute</a> — Execute a prepared statement</li><li><a href="function.odbc-fetch-array.php">odbc_fetch_array</a> — Fetch a result row as an associative array</li><li><a href="function.odbc-fetch-into.php">odbc_fetch_into</a> — Fetch one result row into array</li><li><a href="function.odbc-fetch-object.php">odbc_fetch_object</a> — Fetch a result row as an object</li><li><a href="function.odbc-fetch-row.php">odbc_fetch_row</a> — Fetch a row</li><li><a href="function.odbc-field-len.php">odbc_field_len</a> — Get the length (precision) of a field</li><li><a href="function.odbc-field-name.php">odbc_field_name</a> — Get the columnname</li><li><a href="function.odbc-field-num.php">odbc_field_num</a> — Return column number</li><li><a href="function.odbc-field-precision.php">odbc_field_precision</a> — 别名 odbc_field_len</li><li><a href="function.odbc-field-scale.php">odbc_field_scale</a> — Get the scale of a field</li><li><a href="function.odbc-field-type.php">odbc_field_type</a> — Datatype of a field</li><li><a href="function.odbc-foreignkeys.php">odbc_foreignkeys</a> — Retrieves a list of foreign keys</li><li><a href="function.odbc-free-result.php">odbc_free_result</a> — Free objects associated with a result</li><li><a href="function.odbc-gettypeinfo.php">odbc_gettypeinfo</a> — Retrieves information about data types supported by the data source</li><li><a href="function.odbc-longreadlen.php">odbc_longreadlen</a> — Handling of LONG columns</li><li><a href="function.odbc-next-result.php">odbc_next_result</a> — Checks if multiple results are available</li><li><a href="function.odbc-num-fields.php">odbc_num_fields</a> — Number of columns in a result</li><li><a href="function.odbc-num-rows.php">odbc_num_rows</a> — Number of rows in a result</li><li><a href="function.odbc-pconnect.php">odbc_pconnect</a> — Open a persistent database connection</li><li><a href="function.odbc-prepare.php">odbc_prepare</a> — Prepares a statement for execution</li><li><a href="function.odbc-primarykeys.php">odbc_primarykeys</a> — Gets the primary keys for a table</li><li><a href="function.odbc-procedurecolumns.php">odbc_procedurecolumns</a> — Retrieve information about parameters to procedures</li><li><a href="function.odbc-procedures.php">odbc_procedures</a> — Get the list of procedures stored in a specific data source</li><li><a href="function.odbc-result.php">odbc_result</a> — Get result data</li><li><a href="function.odbc-result-all.php">odbc_result_all</a> — Print result as HTML table</li><li><a href="function.odbc-rollback.php">odbc_rollback</a> — Rollback a transaction</li><li><a href="function.odbc-setoption.php">odbc_setoption</a> — Adjust ODBC settings</li><li><a href="function.odbc-specialcolumns.php">odbc_specialcolumns</a> — Retrieves special columns</li><li><a href="function.odbc-statistics.php">odbc_statistics</a> — Retrieve statistics about a table</li><li><a href="function.odbc-tableprivileges.php">odbc_tableprivileges</a> — Lists tables and the privileges associated with each table</li><li><a href="function.odbc-tables.php">odbc_tables</a> — Get the list of table names stored in a specific data source</li></ul></li></ul></div><?php manual_footer($setup); ?>