
Using the CF.query function
659
Using CF.query positional argument syntax
Positional arguments support a subset of
CF.query
arguments, and you can create more efficient
code. The following is the syntax for the positional argument style:
// CF.query positional argument syntax
CF.query(datasource, sql);
CF.query(datasource, sql, maxrows);
CF.query(datasource, sql, username, password);
CF.query(datasource, sql, username, password, maxrows);
Note:
When using positional arguments, do not use curly braces {}.
About the CF.query record set
The
CF.query
function returns a RecordSet object, which is an instance of the RecordSet class of
objects. The RecordSet class provides a wide range of functions for handling record set data.
You use methods in the RecordSet ActionScript class in your client-side ActionScript to change
data returned in the
CF.query
record set.
Currently, the following methods are available in the RecordSet class:
:
Method
Description
addItem
Appends a record to the end of the specified RecordSet
addItemAt
Inserts a record at the specified index
addView
Requests notification of changes in a RecordSet object’s state
filter
Creates a new RecordSet object that contains selected records from the
original RecordSet object
getColumnNames
Returns the names of all the columns of the RecordSet
getItemAt
Retrieves a record from a RecordSet object
getItemID
Gets the unique ID corresponding to a record
getLength
Returns the total number of records in a RecordSet object
getNumberAvailable
Returns the number of records that have been downloaded from the server
isFullyPopulated
Determines whether a RecordSet object can be edited or manipulated
isLocal
Determines whether a RecordSet object is local or server-associated
removeAll
Removes all records from the RecordSet object
removeItemAt
Removes a specified record
replaceItemAt
Replaces the entire contents of a record
setDeliveryMode
Changes the delivery mode of a server-associated record set
setField
Replaces one field of a record with a new value
sort
Sorts all records by a specified compare function
sortItemsBy
Sorts all the records by a selected field
Содержание COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Страница 1: ...Developing ColdFusion MX Applications...
Страница 22: ...22 Contents...
Страница 38: ......
Страница 52: ...52 Chapter 2 Elements of CFML...
Страница 162: ......
Страница 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Страница 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Страница 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Страница 266: ......
Страница 314: ...314 Chapter 14 Handling Errors...
Страница 344: ...344 Chapter 15 Using Persistent Data and Locking...
Страница 349: ...About user security 349...
Страница 357: ...Security scenarios 357...
Страница 370: ...370 Chapter 16 Securing Applications...
Страница 388: ...388 Chapter 17 Developing Globalized Applications...
Страница 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Страница 410: ......
Страница 426: ...426 Chapter 19 Introduction to Databases and SQL...
Страница 476: ...476 Chapter 22 Using Query of Queries...
Страница 534: ...534 Chapter 24 Building a Search Interface...
Страница 556: ...556 Chapter 25 Using Verity Search Expressions...
Страница 558: ......
Страница 582: ...582 Chapter 26 Retrieving and Formatting Data...
Страница 668: ......
Страница 734: ...734 Chapter 32 Using Web Services...
Страница 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Страница 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Страница 788: ......
Страница 806: ...806 Chapter 35 Sending and Receiving E Mail...