![]() ![]() ![]() |
The following section describes a few common problems that you may encounter and ways to resolve them.
Problem: ODBC driver manager cannot make a connection to the database.
The basic requirement for getting ColdFusion to work with an ODBC data source is that the ODBC driver manager establishes a connection to the database. Many ODBC problems result from the inability to connect to the database. Connection errors are difficult to diagnose. They include problems with the location of files, network connections, and database client library configuration.
Before you take any other diagnostic steps or seek technical support, verify that you can connect to the database. You can do this by clicking the Verify button on the ODBC Data Sources page of the ColdFusion Administrator. If you are unable to make a simple connection from that page, you need to work with your database and/or driver vendor to solve the problem.
Problem: Data source does not exist or name is incorrectly specified.
Create data sources before you refer to them in your application source files. Also, check the spelling of the data source name.
Problem: The METHOD in forms sent to the ColdFusion server must be Post.
When you invoke a ColdFusion application page from within an HTML form, you must use METHOD="Post" rather than METHOD="Get", which is the default. The METHOD attribute is specified as part of the FORM tag. For example:
<FORM ACTION="test.cfm" METHOD="Post">
If you do not use METHOD="Post", ColdFusion cannot correctly decode the contents of your form submission.
Problem: URLs cannot have embedded spaces.
Many browsers complain when you include spaces in URLs. The correct way to do this is to use a plus sign (+) wherever you want to include a space. ColdFusion correctly translates the + sign into a space.
A common scenario in which this error occurs is when you dynamically generate your URL from database text fields that may have embedded spaces. To avoid this problem, include only numeric values in the dynamically generated portion of URLs.
Or, you can use the URLEncodedFormat function, which automatically replaces spaces with + signs. See the CFML Language Reference for information on using this function.
Problem: An end tag is omitted.
It is a common error to omit the end tag for the CFQUERY, CFOUTPUT, CFTABLE, or CFIF tag. If you get an error message you don't understand, the first thing you should do is make sure all your CFML tags have matching end tags where appropriate.
When developing pages in ColdFusion Studio, use the Tag Completion feature, which adds an editing tag each time you create an opening tag.
Problem: Invalid attribute or value.
If you use an invalid attribute or attribute values, ColdFusion returns an error message. To prevent such syntax errors, use the ColdFusion syntax validation tools in ColdFusion Studio.
Problem: Mismatched quotes and escape characters.
Check strings in attributes and expressions for proper placement of single and double quotes.
Version 4.0 of the Cold Fusion Application Server features stricter enforcement of CFML syntax rules. Strict checking can uncover hidden bugs and other types of undesirable behaviors in your ColdFusion application pages. Allaire recommends that you always use the strictest possible level of CFML validation.
In rare cases, the more relaxed validation mechanisms used by previous versions of Cold Fusion may have allowed you to use syntactically incorrect CFML constructs. The CFML Syntax Checker is a simple application that can aid you in the process of discovering which of your CFML templates may not conform to the rules CFML 4.0.
The CFML Syntax Checker is available in your ColdFusion installation directory at install_dir/cfdocs/cfmlsyntaxcheck.cfm
.
For more information, see the online documentation in the CFML Syntax Checker application.
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.