Category Archives: Code

Remove dollar formatting

Sometimes users will not follow instructions and will include $ signs and dollar formatting when providing dollar amounts.  Here is the fix. #rereplace(new_value, “[^\d.]”, “”, “ALL”)#

Posted in Code, Coldfusion, Snippets | Tagged , | Comments Off on Remove dollar formatting

HTTP Header Variables

The company passes certain header variables to my website that I can use for security and tracking of users. I needed a way to see these values on a test page.  Fortunately there is a simple dump of header variables … Continue reading

Posted in Code, Coldfusion, Snippets | Comments Off on HTTP Header Variables

CFC Bind errors

I can never seem to write a componenct without some sort of error in the SQL or in the structure. Here is my list of things to check if I can not find the error. In the bind statement make sure … Continue reading

Posted in Code, Coldfusion, Problems & Fixes | Tagged , , | Comments Off on CFC Bind errors

Coldfusion working around SQL Server Key words

In one of our older database tables we have a field named “ROLLUP”. For SQL SERVER 2008 this is a reserved word. When writing dynamic SQL with group by statements using the column name “rollup” coldfusion will throw a syntax … Continue reading

Posted in Coldfusion, Problems & Fixes, Snippets, SQL | Comments Off on Coldfusion working around SQL Server Key words

Coldfusion Error – value cannot be converted to a number

Here is a message that comes up often in CF error messages that is sometimes tough to figure out. The value ” cannot be converted to a number. This usually indicates that a Null value (ie record is missing a … Continue reading

Posted in Problems & Fixes, Snippets | Comments Off on Coldfusion Error – value cannot be converted to a number