About the Cf.query function and data sources
You use the
CF.query
retrieved from a Macromedia ColdFusion MX data source. To use the
the following:
To pull data into your Flash MX movie from a ColdFusion MX data source:
Create a server-side ActionScript file that performs queries against a ColdFusion MX data
1
source.
Write ActionScript code in your Flash MX movie that references your ActionScript file (.asr)
2
on the ColdFusion server.
You create server-side ActionScript to execute the query and return the data in a record set to the
client—your Flash MX movie. You can use methods in the RecordSet ActionScript object on the
client to manipulate data in the record set and present data in your Flash MX movie.
Note: Client-side ActionScript files use the .as extension. Server-side ActionScript files use the .asr
(ActionScript remote) extension.
Publishing dynamic data
You use the server-side ActionScript feature in ColdFusion MX to publish dynamic data. To do
this, you write server-side ActionScript files that perform queries against ColdFusion MX data
sources. Before using ActionScript, you must understand how to do the following:
•
Create database queries in the server-side ActionScript file using the
function. See
•
Reference the server-side ActionScript file in your Flash MX movie. See
Flash Remoting service" on page
Using the
CF.query
•
Create user login interfaces that validate users against a ColdFusion MX data source.
•
Populate form elements and data grids with data from a ColdFusion MX 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 MX data source (see
CF.query
"About ColdFusion MX data sources" on page
About ColdFusion MX data sources
For ColdFusion MX developers, the term data source can refer to a number of 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 MX database.
Your ColdFusion MX administrator can help you identify and configure data sources. To create
ActionScript files that successfully perform queries on ColdFusion MX data sources, you must
know how the data source is identified by ColdFusion MX, as well as any other parameters that
affect your ability to connect to that database, such as whether a username and password are
required to connect.
function to populate Macromedia Flash MX movie elements with data
"Using the CF.query function" on page
654.
function, you can do the following tasks:
658.
657).
About the Cf.query function and data sources
function you do
CF.query
ActionScript
CF.query
"Connecting to the
657
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers