Monday, December 07, 2009

cfupdate in CF

Updates records in a data source from data in a ColdFusion form or form Scope.

Syntax :


Attribute - description

dataSource- Name of the data source that contains the table. tableName- Name of table to update. tableOwner- For data sources that support table ownership tableQualifier- For data sources that support table qualifiers. username- Overrides username value specified in ODBC setup.password- Overrides password value specified in ODBC setup.formFields-Comma-delimited list of form fields to update.

Note :
If a form field is not matched by a column name in the database, ColdFusion throws an error.
The formFields lies must include the database table primary key field, which must be present in the form. It can be hidden.

Program :

SELECT Course_Number, Course_ID, DescriptFROM CoursesWHERE Course_ID = #Trim(url.Course_ID)#ORDER by Course_Number

Source : http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-c19.htm#wp1104662

No comments:

Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory