<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.pdo-informix.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'ref.pdo-informix.connection.php',
    1 => 'PDO_INFORMIX DSN',
    2 => 'Informix データベースに接続する',
  ),
  'up' => 
  array (
    0 => 'ref.pdo-informix.php',
    1 => 'Informix PDO ドライバ',
  ),
  'prev' => 
  array (
    0 => 'ref.pdo-informix.php',
    1 => 'Informix PDO ドライバ',
  ),
  'next' => 
  array (
    0 => 'ref.pdo-mysql.php',
    1 => 'MySQL PDO ドライバ',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/pdo_informix/reference.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ref.pdo-informix.connection" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">PDO_INFORMIX DSN</h1>
    <p class="verinfo">(PECL PDO_INFORMIX &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">PDO_INFORMIX DSN</span> &mdash; <span class="dc-title">Informix データベースに接続する</span></p>

   </div>

   <div class="refsect1 description" id="refsect1-ref.pdo-informix.connection-description">
    <h3 class="title">説明</h3>
    <p class="para">
     PDO_INFORMIX データソース名 (DSN) は、Informix ODBC DSN 文字列を基にしています。
     Informix ODBC DSN の設定についての詳細は、
     <a href="https://www.ibm.com/docs/en/informix-servers/14.10?topic=guide-configure-data-sources" class="link external">&raquo;&nbsp;Informix Dynamic Server Information
      Center</a> にあります。PDO_INFORMIX DSN の主要な部分は以下のようになります。
     <dl>
      
       <dt>DSN 接頭辞</dt>
       <dd>
        <p class="para">
        DSN 接頭辞は <strong class="userinput"><code>informix:</code></strong> です。
        </p>
       </dd>
      
      
       <dt>DSN</dt>
       <dd>
        <p class="para">
         DSN は、<var class="filename">odbc.ini</var>
         を使用したデータソース設定、あるいは完全な
         <a href="https://www.ibm.com/docs/en/informix-servers/14.10?topic=sources-connection-string-keywords-that-make-connection" class="link external">&raquo;&nbsp;接続文字列</a>
         のいずれかです。
        </p>
       </dd>
      
     </dl>
    </p>
   </div>

   <div class="refsect1 examples" id="refsect1-ref.pdo-informix.connection-examples">
    <h3 class="title">例</h3>
    <p class="para">
     <div class="example" id="example-1">
      <p><strong>例1 <var class="filename">odbc.ini</var> を使用した PDO_INFORMIX DSN の例</strong></p>
      <div class="example-contents"><p>
       以下の例は、<var class="filename">odbc.ini</var> で Infdrv33
       として登録されている Informix データベースに接続するための
       PDO_INFORMIX DSN を表します。
       <div class="example-contents"><div class="cdata"><pre>
$db = new PDO(&quot;informix:DSN=Infdrv33&quot;, &quot;&quot;, &quot;&quot;);
</pre></div></div>

       <div class="example-contents"><div class="cdata"><pre>
[ODBC Data Sources]
Infdrv33=INFORMIX 3.3 32-BIT

[Infdrv33]
Driver=/opt/informix/csdk_2.81.UC1G2/lib/cli/iclis09b.so
Description=INFORMIX 3.3 32-BIT
Database=common_db
LogonID=testuser
pwd=testpass
Servername=ids_server
DB_LOCALE=en_US.819
OPTIMIZEAUTOCOMMIT=1
ENABLESCROLLABLECURSORS=1
</pre></div></div>

      </p></div>
     </div>
     <div class="example" id="example-2">
      <p><strong>例2 接続文字列を使用した PDO_INFORMIX DSN の例</strong></p>
      <div class="example-contents"><p>
       以下の例は、<strong class="userinput"><code>common_db</code></strong> という名前の
       Informix データベースに接続文字列を使用して接続するための
       PDO_INFORMIX DSN を表します。
       <div class="example-contents"><div class="cdata"><pre>
$db = new PDO(&quot;informix:host=host.domain.com; service=9800;
    database=common_db; server=ids_server; protocol=onsoctcp;
    EnableScrollableCursors=1&quot;, &quot;testuser&quot;, &quot;tespass&quot;);
</pre></div>
       </div>

      </p></div>
     </div>
    
    </p>
   </div>

  </div><?php manual_footer($setup); ?>