UMD Web Site

Page Content   Main Links   Page Links   Utility Links   Search   Footer Links

ColdFusion Development Project

Custom Tags & Remark on cfquery

Remark on cfquery

If you use a cfquery tag for a database query, please define the following application variables in your Application.cfm file:

<cfset application.dataSource = "oracle9">

Use this variable as database datasource parameter for ALL cfquery statements in your ColdFusion applications:

<cfquery name="<query name>" datasource="#application.dataSource#">
  ...
</cfquery>

You won't need to pay attention as to what data source you are developing against. Moving files between development server and production server does not require any modification of the data source. You must always test your work in the development environment first.

When naming a database query please use the database action and the name of the table or view as query name. Let's say you would write a INSERT-statement on a table called wa_location:

<cfquery name="insert_wa_location" datasource="#application.dataSource#">
  insert into wa_location (
    lc_name)
  values (
    '#form.lc_name#')
</cfquery>

The file containing this query would then be named insert_wa_location.cfm.

For more information on naming conventions and development guidelines, please go here.

Custom Tags

Click on a link to jump to the description of a custom tag:

Contact Info:

Email: webdevelopment@umassd.edu - Web Design & Development

Main Links

Page Links

Utility Links

Search

 
Text Only Options

Top of page


Text Only Options

Open the original version of this page.

Usablenet Assistive is a UsableNet product. Usablenet Assistive Main Page.