Tutorial by Examples

One of ColdFusion's strengths is how easy it is to work with databases. And of course, query inputs can and should be parameterized. Tag Implementation <cfquery name="myQuery" datasource="myDatasource" result="myResult"> select firstName, lastName from...
Database connections are set up using the CF Administrator tool. See Database Connections for how to connect a datasource. To execute queries all you need is the <cfquery> tag. The <cfquery> tag connects to and opens the database for you, all you need to do is supply it with the name of...
Many database configurations require authentication (in the form of a username and password) before you can query the database. You can supply these using the username and password attributes. Note: the username and password can also be configured against the datasource in the ColdFusion Administra...
A cached query is a query that has its results stored in the server's memory. The results are stored when the query is first run. From then on, whenever that query is requested again, ColdFusion will retrieve the results from memory. You can cache a query using the cachedAfter attribute. If the que...
You can limit the number of rows to be returned by using the maxrows attribute. <cfquery datasource="Entertainment" maxrows="50"> select * from Movies </cfquery>
You can set a timeout limit using the timeout attribute. This can be useful in preventing requests running far longer than they should and impacting on the whole application as a result. The timeout attribute sets the maximum number of seconds that each action of a query is allowed to execute befor...

Page 1 of 1