Ben Forta

Blog

November 27, 2000

Alternate List Delimiters

ColdFusion features a whole set of list manipulation functions (all beginning with the word "list" and all of which take a list as the first parameter). By default these functions manipulate comma-delimited lists, but you are not limited to this delimiter. In fact, every one of the list functions...

November 26, 2000

Invoke ColdFusion From the Command Line

ColdFusion usually processes requests received from clients (such as Web browsers or WAP devices). But should you ever need ColdFusion to process a page without initiating it from a browser you can do so via CF's CGI interface - cfml.exe. Although intended to provide support for Web servers not...

November 25, 2000

List All Application, Client, and Session Variables

ColdFusion allows you to list all available variables within the APPLICATION, CLIENT, and SESSION scopes (the latter two relative to the currently logged in user). But the way you access these lists is not consistent across all three scopes. APPLICATION and SESSION are structures, so you can use...

November 24, 2000

Determining Identity Field Values

Using SQL Server and tables with identity fields (auto increment primary keys)? Then you have probably needed to know that assigned id and have resorted to using follow-up queries (probably within a transaction block). Well, here's a much simpler (as well as safer) solution. Create a trigger on the...

November 23, 2000

IP Addresses are NOT Unique

Developers are always looking for better ways to uniquely identify clients, and many try to use the remote IP address (which you can get from a CGI variable) for this purpose. Unfortunately, this does not work safely, IP addresses can never be assumed to be unique. Why? Different users of some...

November 22, 2000

Using Active Directory with ColdFusion

If you are using Windows 2000 Server on your network you probably have Active Directory installed. Active Directory is Win2K's Directory Service, and it'll typically store data on users, groups, and more. ColdFusion users can access the data in Active Directory without having to use any special...

November 21, 2000

Prevent Ambiguity - Parenthesize All Expressions

When the expression is evaluated, what will the value of x be? Is it 50 (9 times 6 is 54, minus 4 is 50), or 18 (6 minus 4 is 2, times 9 is 18)? The value is actually 50, but as you can see, order of evaluation makes a big difference. For this reason you should always use parenthesize to explicitly...

November 20, 2000

The REQUEST Scope

Familiar with the REQUEST scope? This variable type (introduced in ColdFusion 4.01) is much like the VARIABLES scope in that it persists until a request has finished processing, but unlike VARIABLES it is visible to all pages that are part of a request (even Custom Tags). And you can use REQUEST...

November 19, 2000

Two Ways to Divide

ColdFusion has two division operators, / and , and they are not the same. / is the standard division operator, divides a number and returns whole numbers only (integers, no fractions). So if you code x will be 3.33333333333, but if you code x will be 3. (Applies to: ColdFusion All)

November 18, 2000

Time to Use Tag Pairs and Sets

Custom tags are an important part of writing organized, structured, and reusable code. And basic Custom Tags are easy to write too. But when you find that you end up with long lists of tag attributes, to attributes with multiple values, then it might be time to take your Custom Tags to the next...

Page 482 of 489 (4885 posts)