<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CFUPDATE</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="説明">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CFUPDATE</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">説明</span>
<p>
ColdFusion フォームまたは Form スコープ内のデータからデータソース内のレコードを更新します。
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">カテゴリ</span>
<p>
データベース操作タグ
</p>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="syntax"><span class="title">シンタックス</span><pre>&lt;cfupdate
   dataSource = &quot;ds_name&quot;
   tableName = &quot;table_name&quot;
   tableOwner = &quot;name&quot;
   tableQualifier = &quot;qualifier&quot;
   username = &quot;username&quot;
   password = &quot;password&quot;
   formFields = &quot;field_names&quot;&gt;
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">関連項目</span>
<p>
cfinsert、cfprocparam、cfprocresult、cfquery、cfqueryparam、cfstoredproc、cftransaction、『ColdFusion MX 開発ガイド』の第21章の「データベースの更新」 の「cfupdate を使用した更新アクションページの作成」
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">ヒストリ</span>
<p>
ColdFusion&#160;MX: connectString、dbName、dbServer、dbtype、provider、および providerDSN 属性は使用禁止になりました。ColdFusion 5 以降のリリースでは、これらは機能せず、エラーを引き起こす可能性があります。
</p>

<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">例</span><pre>&lt;!--- この例では、従業員テーブル内の個人の電話番号を更新することができます。 ---&gt;
&lt;cfif isDefined(&quot;form.phone&quot;)&gt;
   &lt;cfupdate datasource=&quot;cfdocexamples&quot; tablename=&quot;Employees&quot;&gt;
&lt;/cfif&gt;

&lt;cfquery name=&quot;empTable&quot; datasource=&quot;cfdocexamples&quot;&gt;
   select * from employees
&lt;/cfquery&gt;

&lt;!--- このコードにより、従業員テーブルのコンテンツが表示され、更新対象の行を選択できるようになります。 ---&gt;
&lt;table border=&quot;1&quot;&gt;
&lt;cfoutput query=&quot;empTable&quot;&gt;
   &lt;tr&gt;
      &lt;td&gt;#firstName#&lt;/td&gt;
      &lt;td&gt;#lastName#&lt;/td&gt;
      &lt;td&gt;#phone#&lt;/td&gt;
      &lt;td&gt;&lt;a href=&quot;cfupdate.cfm?id=#emp_id#&quot;&gt;Edit&lt;/a&gt;&lt;/td&gt;
   &lt;/tr&gt;
&lt;/cfoutput&gt;
&lt;/table&gt;

&lt;cfif isDefined(&quot;url.id&quot;)&gt;
   &lt;cfquery name=&quot;phoneQuery&quot; datasource=&quot;cfdocexamples&quot;&gt;
      select * from employees where emp_id=#url.id#
   &lt;/cfquery&gt;
&lt;!--- このコードにより、更新するために編集する行が表示されます。 ---&gt;
   &lt;cfoutput query=&quot;phoneQuery&quot;&gt;
      &lt;form action=&quot;cfupdate.cfm&quot; method=&quot;post&quot;&gt;
      #phoneQuery.firstName# #phoneQuery.lastName# 
      &lt;input name=&quot;phone&quot; type=&quot;text&quot; value=&quot;#phone#&quot; size=&quot;12&quot;&gt; 
      &lt;input type=&quot;submit&quot; value=&quot;Update&quot;&gt;
      &lt;input name=&quot;emp_id&quot; type=&quot;hidden&quot; value=&quot;#emp_id#&quot;&gt;
      &lt;!--- emp_id は、CFUPDATE でプライマリーキーとして使用する非表示フィールドとして   渡されます。 ---&gt;
      &lt;/form&gt;
   &lt;/cfoutput&gt;
&lt;/cfif&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="DATASOURCE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DATASOURCE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">必須</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>テーブルが含まれているデータソースの名前です。</p>

  </td>
  </tr>
  </table>
</div>
<div id="TABLENAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TABLENAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">必須</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>更新するテーブルの名前です。 </p><ul>

<li>ORACLE ドライバの場合、大文字で指定する必要があります。</li>

<li>Sybase ドライバの場合、大文字と小文字の区別があるため、テーブルの作成時に使用した名前と大文字小文字を同じにする必要があります。</li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="TABLEOWNER">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TABLEOWNER</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>テーブル所有権がサポートされているデータソース (SQL Server、Oracle、Sybase SQL Anywhere など) の場合は、テーブルの所有者です。</p>

  </td>
  </tr>
  </table>
</div>
<div id="TABLEQUALIFIER">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TABLEQUALIFIER</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>テーブル修飾子がサポートされているデータソースに使用します。テーブル修飾子の内容は次のとおりです。</p><ul>

<li>SQL Server および Oracleでは、テーブルが含まれているデータベースの名前</li>

<li>Intersolv dBASE ドライバの場合は、DBF ファイルのディレクトリ</li>
</ul>


  </td>
  </tr>
  </table>
</div>
<div id="USERNAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">USERNAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>ODBC セットアップで指定されている username の値よりも優先されます。</p>

  </td>
  </tr>
  </table>
</div>
<div id="PASSWORD">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">PASSWORD</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>ODBC セットアップで指定されている password の値よりも優先されます。</p>

  </td>
  </tr>
  </table>
</div>
<div id="FORMFIELDS">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">FORMFIELDS</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">オプション</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "(キーを除くフォーム上のすべて)"


<p>更新するフォームフィールドのカンマ区切りリストです。</p>
<p>フォームフィールドがデータベース内の列名と一致しない場合は、エラーが発生します。 </p>
<p>formFields のリストには、データベーステーブルのプライマリキーフィールドを含める必要があります。このフィールドがフォームに存在している必要があります。このフィールドは非表示にできます。 </p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
