ColdFusion FAQ

What is ColdFusion?
Do I need any special tools to use ColdFusion?
What version of ColdFusion does NetNation provide?
What databases can I use with ColdFusion?
What is RDS? Does NetNation support RDS?
Do you install custom tags?
How do I execute ColdFusion scripts?
How do I execute custom ColdFusion tags (.cfm)?
Do you support CFX tags? What about CFFILE tags?
I need to update my database. How do I do this?
Can I integrate J2EE and Java functionalities into my ColdFusion applications?
Can I use ColdFusion in conjunction with ASP?
What are ColdFusion variable settings?
Can I use CFHTTP?
Can I use CFQUERY to access an ODBC DSN?
How can I send an email from my application?
I'm receiving the error "Data Source Not Found." What's wrong?
I'm receiving the error "File Not Found." What's wrong?
I'm receiving a parameter error. What's wrong?
Where can I learn more about working with ColdFusion?


What is ColdFusion?

ColdFusion is a set of Web development products developed by Allaire, which has recently merged with Macromedia.

The ColdFusion development environment makes it easy for you to build dynamic Web sites and Internet applications. With ColdFusion, you can develop a site or application that pulls data from a content database and then use templates to dynamically create Web site pages using the content stored in your database. ColdFusion is often used to build ecommerce sites.

ColdFusion enables you to perform tasks such as:

•  Query existing database applications for data.
•  Create dynamic queries facilitating more flexible data retrieval.
•  Execute stored procedures in databases.
•  Enhance the standard HTML form capabilities with data validation functions.
•  Dynamically populate form elements through database retrieval.
•  Customize the display dates, times and currency values with formatting functions.

ColdFusion includes ColdFusion Studio, which you can use to design and develop your templates, and ColdFusion Server, which interacts with relational databases and serves the Web pages to your users.



Do I need any special tools to use ColdFusion?

Because ColdFusion integrates its code (CFML) with standard HTML code, you can use any standard Web development application or a text editor to develop your templates. However, if you plan on building a large or complex site, you may find it helpful to use ColdFusion Studio.



What version of ColdFusion does NetNation provide?

NetNation runs ColdFusion MX Version 6.1.



What databases can I use with ColdFusion?

ColdFusion works with ODBC-compliant databases. With NetNation's ColdFusion plans, you can use a Microsoft FoxPro, Microsoft Access or Microsoft SQL Server database. ColdFusion supports both DSN and DSN-less connections.



What is RDS? Does NetNation support RDS ?

When discussing ColdFusion, RDS stands for Remote Development Services. Because RDS is not designed for a shared hosting environment, it presents a high security risk and is not enabled on NetNation's shared servers.



Do you install custom tags?

If you need a custom tag installed, contact NetNation support via your AccountManager.



How do I execute ColdFusion scripts?

Your ColdFusion scripts can be placed anywhere in your /www directory. The extensions *.cfm and *.dbm are mapped to the ColdFusion script engine.



How do I execute custom ColdFusion tags?

You can place your custom ColdFusion tags (.cfm) in any directory under your /www directory. Once you have uploaded your files, you will need to use the CFMODULE tag to specify the location of your .cfm tags.

If you call custom CFM tags directly, the custom tag must be placed in the same directory as the calling template.



Do you support CFX tags? What about CFFILE tags?

Yes. NetNation supports both CFX and CFFILE tags.



I need to update my database. How do I do this?

Because your site is pulling content from your database, it is not advisable to FTP your new database over your existing database. Instead, you should upload your new database with a different name. Once it is uploaded and you have made all the necessary changes, you can rename it to the correct name and remove your out-of-date database.



Can I integrate J2EE and Java functionalities into my ColdFusion applications?

ColdFusion MX uses the J2EE (Java 2 Platform, Enterprise Edition) infrastructure for many of its base services. This enables you to easily integrate J2EE and Java functionality into your ColdFusion applications. For example, you can:

• Use custom JSP (Java Server Pages) tags from JSP tag libraries
• Interoperate with JSP pages
• Use Java servlets
• Use Java objects, including J2EE Java API, JavaBeans and Enterprise JavaBeans.



Can I use ColdFusion in conjunction with ASP?

While you can use ColdFusion and ASP within the same site, it is difficult—and not recommended—to use both within the same page.



What are ColdFusion variable settings?

The default setting (and maximum value) for session variables is 20 minutes.
The default setting (and maximum value) for application variables is 2 days.



Can I use CFHTTP?

The CFHTTP tag does not work as described in the ColdFusion Manual due to security restrictions in a shared environment. Specifically, if the METHOD attribute is set to "GET" then the #CFHTTP.FileContent#variable cannot be used to retrieve data extracted with CFHTTP.

You can work around this problem by using the PATH and FILE attributes to specify where the file should be created. Instead of using the CFHTTP.FileContent variable, read the downloaded file using CFFILE tag from the location specified in the CFHTTP PATH attribute. You may want to use a special directory for the PATH to these temporary files, as you will need to grant write access to the directory.



Can I use CFQUERY to access an ODBC DSN?

Once you have created an ODBC Data Source Name for your database, you can use CFQUERY:

<CFQUERY Name="myqueryname" DATASOURCE="DSNName" USERNAME="username" PASSWORD="password">



How can I send an email from my application ?

To send an email from a ColdFusion application, you use the CFMail tag. The following sample code illustrates how you can send a confirmation email to a visitor:

<CFMAIL to="#ContactEmail#" from="From Email" Subject="The Subject">

Thank you for your message,
We'll be in touch as soon as we can. Thanks for visiting our site,
Webmaster
You wrote:
#ContactMessage#
Message By: #ContactName# - #ContactEmail#
==================================
</CFMAIL>



I'm receiving the error "Data Source Not Found." What's wrong?

If you are receiving this error, make sure that you have created the DSN. You should also check for any spelling errors.



I'm receiving a "File Not Found" error. What's wrong?

This error indicates that the ODBC driver can not find the file in the location it expected. To try and resolve this problem, perform the following steps:

• Ensure that you have created the data files.
• Check the ODBC source settings and spelling.
• If the file has been moved, manually update the file location information for any ODBC sources that reference the file.
• Check that the database file defined by the DSN has not been renamed.



I'm receiving a parameter error. What's wrong?

Parameter errors occur when a SQL statement references a field name that does not exist in the data source. You should check the SQL statement or query indicated in the error message and verify that:

• You are using the correct data source with the query.
• The fields exist and you have spelled their names correctly.
• Any literals or strings in the query are enclosed in single quotes.



Where can I learn more about working with ColdFusion?



© 2003 NetNation Communications
All rights reserved.