Ben Forta

Blog

January 21, 2002

Enforcing Maximum Table Column Width

Generally, if a SQL statement attempts to save more data then is allowed by a column's width, that data will be truncated. If you'd rather not write the data at all if it will not fit, use and specify the maximum allowed length in the MAXLENGTH attribute. This way an error will be thrown and the...

January 20, 2002

Is Not Always Supported

is used to create bind parameters in ColdFusion SQL statements. For to work the DBMS and drivers must support this feature (most good DBMS's, including SQL Server and Oracle, do). ColdFusion will try to automatically detect their support and degrade the query as necessary. But as a rule you should...

January 19, 2002

And Explicit Types

is used to define bind parameters, allowing for faster (and more secure) SQL statement execution. When using make sure to explicitly provide the data type, and do not rely on the default value (string). (Applies to: ColdFusion 4.5 or later)

January 18, 2002

And Binary Data

is used to perform server-side HTTP operations, retrieving data from other servers. can retrieve any data - text or binary. But be careful when requesting binary data (like graphics), these should not be accessed as variables using CFHTTP.FileContent, but should be written to file using the PATH...

January 17, 2002

Don't Use SetVariable()

The CFML SetVariable() function can be used to set variables, even variable names constructed dynamically - for example, if i were 2, SetVariable("item" & i, 10) would set variable item2 to 10. But in newer versions of ColdFusion this function is not needed, can do the same thing and do it...

January 16, 2002

Array Functions Versus List Functions

The list functions and the array functions look similar - they both allow sorting, insertion, deletion, and more. But there is a very important difference between the two sets of functions - the list functions return modified lists (the original list is not updated at all), whereas the array...

January 15, 2002

Unsupported Attributes

generates standard HTML tags, along with client-side JavaScript field validation code (if desired). supports all the standard attributes (like NAME, TYPE, and SIZE) and passes these to the generated code. But what if you need to use an attribute not supported by ? To do this use the PASSTHROUGH...

January 14, 2002

Programmatic Generation

Need to programmatically add content to the section of your page? You can do so using the tag which takes a single attribute - the text to be written to the . This can be used to embed JavaScript code, add META, or LINK tags, or more. But be careful not to use this tag after a , doing so will...

January 13, 2002

Generating HTTP Page Headers

HTTP page headers are generated automatically for all ColdFusion pages, but if you do need to set your own page headers you can do so using the tag. can be used in two ways - use the NAME and VALUE attributes to set an HTTP header, or use the STATUSCODE and STATUSTEXT attributes to set an HTTP...

January 12, 2002

Setting Uploaded File Attributes

can be used to accept uploaded files using the ACTION="UPLOAD" attribute. Uploaded files may be saved in a directory of your choosing, and when files are saved file attributes may be optionally set as well. Attributes must be specified in a comma-delimited list passed to the ATTRIBUTES attribute....

Page 440 of 489 (4885 posts)