cfgridupdate

Used within a cfgrid tag. Updates data sources directly from
edited grid data. This tag provides a direct interface with
your data source.

This tag applies delete row actions first, then insert row
actions, then update row actions. If it encounters an error,
it stops processing rows.

  <cfgridupdate grid="" datasource="" tablename="">

 cfgridupdate(grid="", datasource="", tablename="");

This tag requires Adobe ColdFusion 3 and up.  Not supported on Lucee, etc.

Discouraged: The use of tags generating UI is generally discouraged by the CFML community. See: https://static.raymondcamden.com/cfuitherightway/cfgrid/index.html

Attribute Reference

grid string
Required

Name of cfgrid form element that is the source for the
update action.

datasource string
Required

Name of data source for the update action.

tablename string
Required

Table in which to insert form fields.

ORACLE drivers: must be uppercase.
Sybase driver: case-sensitive. Must be the same case used
when table was created

username string

Overrides username specified in ODBC setup.

password string

Overrides password specified in ODBC setup.

tableowner string

Table owner, if supported.

tablequalifier string

For data sources that support table qualifiers, use this
field to specify qualifier for table. The purpose of table
qualifiers varies among drivers. For SQL Server and
Oracle, qualifier refers to name of database that contains
table. For Intersolv dBASE driver, qualifier refers to
directory where DBF files are located.

keyonly boolean

Applies to the update action:
Yes: the WHERE criteria are limited to the key values
No: the WHERE criteria include key values and the original
values of changed fields
Values:
  • true
  • false

Examples
Sample code using the cfgridupdate tag

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub