MACROMEDIA COLFUSION MX 7-CFML Reference page 799

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

Example
The following example uses the
It populates two rows of the query and displays the contents of the query object and its metadata.
<!--- Create a new three-column query, specifying the column data types --->
<cfset myQuery = QueryNew("Name, Time, Advanced", "VarChar, Time, Bit")>
<!--- Make two rows in the query --->
<cfset newRow = QueryAddRow(MyQuery, 2)>
<!--- Set the values of the cells in the query --->
<cfset temp = QuerySetCell(myQuery, "Name", "The Wonderful World of CMFL", 1)>
<cfset temp = QuerySetCell(myQuery, "Time", "9:15 AM", 1)>
<cfset temp = QuerySetCell(myQuery, "Advanced", False, 1)>
<cfset temp = QuerySetCell(myQuery, "Name", "CFCs for Enterprise
Applications", 2)>
<cfset temp = QuerySetCell(myQuery, "Time", "12:15 PM", 2)>
<cfset temp = QuerySetCell(myQuery, "Advanced", True, 2)>
<h4>The query object contents</h4>
<cfoutput query = "myQuery">
#Name# #Time# #Advanced#<br>
</cfoutput><br>
<br>
<h4>Using individual query data values</h4>
<cfoutput>
#MyQuery.name[2]# is at #MyQuery.Time[2]#<br>
</cfoutput><br>
<br>
<h4>The query metadata</h4>
<cfset querymetadata=getMetaData(myQuery)>
<cfdump var="#querymetadata#">
function to create an empty query with three columns.
QueryNew
QueryNew
799

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents