April 21, 2001
ColdFusion 4 introduced query caching, a mechanism by which queries may be reused to prevent unnecessary database access. But to prevent this feature from chewing up uncontrolled amounts of memory, it was limited to 100 queries only. Need to cache more queries than that? Actually, despite what the...
April 20, 2001
If you ever build URL parameters dynamically (using variables or database columns) make sure to use Trim() to trim any leading or trailing spaces from those values. URL length is limited, and many browsers (particularly older ones) have problems with long query strings. Any saved space helps....
April 19, 2001
Access to data in shared scopes must be locked to prevent data and memory corruption. But if you need to access the same shared scope variable over and over, don't lock it every time. Instead, lock it once and make a local copy (in either the VARIABLES or REQUEST scopes) and then read the local...
April 18, 2001
Cookies created using are usually sent to the browser unencrypted. To send cookies encrypted use the SECURE="YES" attribute. But two things to note. Firstly, if the browser does not support SLL the cookies will not be sen. And secondly, this attribute only effects the cookie transmission, the...
April 17, 2001
If is failing with connection errors, check to see that simultaneous requests (in the ColdFusion Administrator) is set to a value greater than 1. uses internally to make a local call to execute the page and grab the results. Obviously, if simultaneous requests is set to 1, ColdFusion will not be...
April 16, 2001
CFML features a tag named that can be used to "simplify" the creation of dynamic HTML tables. As a rule, avoid the use of this tag. Manually creating tables is not complex at all, and the amount of control over appearance that you lose by using this tag does not justify the minimal time saved (if...
April 15, 2001
ColdFusion Studio allows you to create Projects to organize your development work. There are many reasons to use Projects, you can open entire Projects at once, perform global search and replaces across all Project members, and more. But the most important use for Projects is the ability to upload...
April 14, 2001
Passing data in hidden fields is common practice among ColdFusion developers, as it should be. Being able to send data back and forth allows you to embed hidden information that you know you'll get back when the form is submitted. But be careful, don't place confidential information in hidden form...
April 13, 2001
When debugging ColdFusion applications developers often find that they have to write output to the screen (perhaps to display variable contents, or to check code flow). If the generated output is simple HTML then it is quite easy to find and read this output, but if you are generating more complex...
April 12, 2001
What is the difference between "WHERE pk=#pk#" and WHERE "pk=pk"? Lots. The former compares a database column to a ColdFusion variable (and will likely match a single row, if the primary key is specified). The latter compares the value in each column to itself, in other words, it matches every...