Adobe COLDFUSION 9 Manual page 699

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Publishing dynamic data
You use the server-side ActionScript feature in ColdFusion to publish dynamic data. To do this, you write server-side
ActionScript files that perform queries against ColdFusion data sources. Before using ActionScript, you must
understand how to do the following:
• Create database queries in the server-side ActionScript file using the
the CF.query
function" on page 694.
• Reference the server-side ActionScript file in your SWF movie. See
page 691.
Using the
function, you can do the following tasks:
CF.query
• Create user login interfaces that validate users against a ColdFusion data source.
• Populate form elements and data grids with data from a ColdFusion data source.
• Create banners that pull data (such as URLs or image file paths) out of a database.
The
function can retrieve data from any supported ColdFusion data source (see
CF.query
sources" on page 694).
About ColdFusion data sources
For ColdFusion developers, the term data source can mean many different types of structured data accessible locally
or across a network. You can query websites, Lightweight Directory Access Protocol (LDAP) servers, POP mail
servers, and documents in a variety of formats. For server-side ActionScript, a data source ordinarily means the entry
point to a ColdFusion database.
Your ColdFusion administrator can help you identify and configure data sources. To create ActionScript files that
successfully perform queries on ColdFusion data sources, you must know how ColdFusion identifies the data source,
as well as any other parameters that affect your ability to connect to that database, such as whether a user name and
password are required to connect.
You use server-side ActionScript in ColdFusion to return record set data to a Flash client from a ColdFusion data
source. You specify the ColdFusion data source name and the SQL statement you execute on the data source as
arguments in the
CF.query
Typically, your server-side ActionScript handles the interaction with the ColdFusion data source, and returns a record
set to the Flash client through the Flash Remoting service.
For more detailed information about ColdFusion data sources, see Configuring and Administering ColdFusion.
Using the CF.query function
You use the
function in your server-side ActionScript to retrieve data from a ColdFusion data source. This
CF.query
function lets you perform queries against any ColdFusion data source.
Note: The
function maps closely to the
CF.query
attributes.
cfquery
Use the
function to do the following:
CF.query
• Identify the data source you want to query.
• Pass SQL statements to the data source.
• Pass other optional parameters to the database.
For reference information about the
function in server-side ActionScript.
cfquery
function, see CF.query in the CFML Reference.
CF.query
Last updated 8/5/2010
ActionScript function. See
CF.query
"Connecting to the Flash Remoting
CFML tag, although it currently supports a subset of the
694
"Using
service" on
"About ColdFusion data

Advertisement

Table of Contents
loading

Table of Contents