Contents > CFML Reference > ColdFusion Tags > cfgridupdate PreviousNext

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.

Forms tags

<cfgridupdate 
grid = "gridname"
dataSource = "data source name"
tableName = "table name"
username = "data source username"
password = "data source password"
tableOwner = "table owner"
tableQualifier = "qualifier"
keyOnly = "Yes" or "No">

cfgrid, cfgridcolumn, cfgridrow, cfapplet, cfform, cfinput, cfselect, cfslider, cftextinput, cftree

ColdFusion MX: Deprecated the connectString, dbName, dbServer, dbtype, provider and providerDSN attributes. They do not work, and might cause an error, in releases later than ColdFusion 5.

Attribute

Req/Opt

Default

Description

grid

Required

 

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

dataSource

Required

 

Name of data source for the update action.

tableName

Required

 

Name of table to update.

For ORACLE drivers, entry must be upper-case.

For Sybase driver, entry is case-sensitive; must be same case as used when table was created

username

Optional

 

Overrides username value specified in ODBC setup.

password

Optional

 

Overrides password value specified in ODBC setup.

tableOwner

Optional

 

Table owner, if supported.

tableQualifier

Optional

 

Table qualifier, if supported. Purpose:

  • SQL Server and Oracle driver: name of database that contains table
  • Intersolv dBASE driver: directory of DBF files

keyOnly

 

No

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

<!--- This example shows the cfgridupdate tag--->
...
<!--- If the gridEntered form field has been tripped, perform 
the gridupdate on the table specified in the database. Using the default value keyonly = yes lets us change only the
information that differs from the previous grid ---> <cfif IsDefined("form.gridEntered") is True> <cfgridupdate grid = "FirstGrid" dataSource = "cfsnippets" tableName = "CourseList" keyOnly = "Yes"> </cfif> ...

Contents > CFML Reference > ColdFusion Tags > cfgridupdate PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.