<cfupdate>
Updates existing records in data sources.
This tag is very old and inflexible, it's recommended to use <cfquery> or QueryExecute() instead.
This tag cannot have a body.
This tag is also supported within <cfscript>
<cfupdate
dataSource=object
tableName=string
tableOwner=string
tableQualifier=string
username=string
password=string
formFields=string
source=object
>
| Attribute | Description |
|---|---|
dataSource
object, optional
|
edit
Name of the data source that contains a table. |
tableName
string, required
|
edit
Name of the table you want to update. |
tableOwner
string, optional
|
edit
For data sources that support table ownership, for example, SQL Server, Oracle, and Sybase SQL Anywhere, use this field to specify the owner of the table. |
tableQualifier
string, optional
|
edit
For data sources that support table qualifiers, use this field to specify the qualifier for the table. The purpose of table qualifiers varies across drivers. For SQL Server and Oracle, the qualifier refers to the name of the database that contains the table. For the Intersolv dBase driver, the qualifier refers to the directory where the DBF files are located. |
username
string, optional
|
edit
If specified, username overrides the username value specified in the ODBC setup. |
password
string, optional
|
edit
If specified, password overrides the password value specified in the ODBC setup. |
formFields
string, optional
|
edit
A comma-separated list of form fields to update. If this attribute is not specified, all fields in the form are included in the operation. Alias: columns |
source
object, optional
|
edit
Default is the Introduced: 7.0.0.232 |
Examples
editExample content for cfupdate
<cfupdate datasource="sample_dsn" tablename="test_tbl">
See also
- <cfinsert>
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)