574
CFML Language Reference
Notes on date-and-time values
There are a variety of ways in which a date-and-time value can be entered in
ColdFusion. You can use the functions that create date-and-time objects using various
criteria. (See Chapter 2 for information about date-and-time functions.)
Queries
ColdFusion queries can be referenced as objects by
assigning a query to a variable:
<CFQUERY NAME=myquery
DATASOURCE=mydata
SELECT * FROM CUSTOMERS
</CFQUERY>
<CFSET myquery2=myquery>
In this case (unlike the same operation with arrays) the
query is not copied. Instead, both names point to the record
set data so that if you make changes to the table referenced
in the query, the original query and the query object
myquery2 will both reflect those changes.
Queries and variables cannot have the same name at the
same time in the same application page.
COM objects
COM (Component Object Model) objects are non-visual
components that encapsulate specific functionality you can
invoke in your application pages. ActiveX, OCX, CORBA, and
ADO objects are examples of COM objects.
COM objects generally contain methods, like functions, you
can use to execute certain operations:
<CFSET temp=Mailer.SendMail()>
COM objects also generally contain properties you can read
and write using ColdFusion variables:
<CFSET Mailer.FromName=Form.fromname>
Properties can be invoked on either side of an assignment.
For more information about COM objects, see Developing
Web Applications with ColdFusion.
Variables
When variables are used in ColdFusion expressions,
the value stored in the variable is returned. The values
can be one of the previously described basic objects:
numbers, strings, Boolean values, date-and-time
objects, or lists.
Objects Used to Build ColdFusion Expressions
Type
Description
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...