• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

QuerySetCell

Synopsis

                  QuerySetCell(query, columnname, value [, row])

Sets the cell in columnname to value for the specified query. An optional row number may be set, specifying the row for the cell to be set in. If no row number is specified, the cell in the last row of the query is set. QuerySetCell( ) returns true upon successful completion. Here’s an example that adds data to an empty query:

<cfset Products = QueryNew("ProductName, Color, Price, Qty")>
<cfset NewRows  = QueryAddRow(Products, 3)>
   
<cfset QuerySetCell(Products, "ProductName", "Widget", 1)>
<cfset QuerySetCell(Products, "Color", "Silver", 1)>
<cfset QuerySetCell(Products, "Price", "19.99", 1)>
<cfset QuerySetCell(Products, "Qty", "46", 1)>
   
<cfset QuerySetCell(Products, "ProductName", "Thingy", 2)>
<cfset QuerySetCell(Products, "Color", "Red", 2)>
<cfset QuerySetCell(Products, "Price", "34.99", 2)>
<cfset QuerySetCell(Products, "Qty", "12", 2)>
   
<cfset QuerySetCell(Products, "ProductName", "Sprocket", 3)>
<cfset QuerySetCell(Products, "Color", "Blue", 3)>
<cfset QuerySetCell(Products, "Price", "1.50", 3)>
<cfset QuerySetCell(Products, "Qty", "460", 3)>
 ....

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint