Recently I was working on some SQL scripts using TSQL in SQL Server Management Studio and from force of habit I was using the "GO" statement between each of my SQL statements to seperate them.
I then started re-factoring the SQL, creating variables where I had hardcoded values etc. and placed those variable declarations at the top of the script.
After re-factoring, I executed the scipt and got an error message saying that the variable @varName was not defined?
I checked for any typos...none. I then started breaking down the script to see if I could isolate the issue. When I removed the "GO" statements, the script executed without error.
It turns out that "GO" is not a TSQL statement, but rather a command that is recognised by the sqlcmd and osql utilities and SQL Server Management Studio. These utilities interpret the "GO" statement as a signal that it should send the current batch of TSQL statements to an instance of SQL Server. Therefore any variables declared before the last "GO" and the next will NOT be available in the current batch of statements.
Just for fun I then copied my TSQL into a <cfquery> and when I executed this, found that the same error was thrown.
One to watch out for if you're not familiar with the true definition of the "GO" statement.
Full details of the "GO" statement can be found here: http://msdn.microsoft.com/en-US/library/ms188037(v=SQL.90).aspx
I came across an issue yesterday where I wanted to control the alignment of certain columns in an HTML data grid using the ColfFusion \ ExtJS CFGRID. At first I tried the "dataalign" and "headeralign" attributes of CFGRIDCOLUMN but after checking the docs it turns out that these are only available with grid formats applet \ flash.
You can also update just the column headers using a similar method.
Credit goes to the following post http://www.webtrenches.com/post.cfm/quick-and-easy-column-alignment-for-cfgrid by @spraguey
When deploying applications to any 3rd party hosting provider or client, you may wish to consider protecting your development effort and intellectual properties (IP) by either encrypting or pre-compiling the application code.
In the attached document, I will briefly cover a number of ways in which you can accomplish this.
There are currently three methods of deploying your ColdFusion applications in an encrypted format, which ship with ColdFusion, so as to help protect your code:
1. Encrypting templates using the “cfencode” utility.
2. Pre-compiling and deploying templates as Java Byte code using the “cfcompile” utility.
3. Deployment Packages as J2EE Archives (EAR or WAR files) – accomplished using the ColdFusion Administrator.
Another option is packaging your application in ColdFusion Archive Files (CAR), but this is not within the scope of this document as there is no compilation or encryption used with this method.
Further details can be found at: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=deploying_3.html
The above options all have their own behaviours, pros and cons. These are discussed in more detail below.
The document can be downloaded from here.
If anyone has anything to add, please feel free to contact me or comment below.
I came across these before but thought I'd share them out as they're pretty handy resources: DZone Check out the Cheatsheets too at RefCardz. There's one on getting started with ColdFusion 9.
For ColdFusion, check out ColdFusion Portal.
Everyone knows how much of a pain it is to debug and test stuff in IE - especially for cross browser compatability and JS/AJAX errors or callbacks.
For development purposes - the following company provide a few nice solutions that could help with developing web applications in a number of versions of Internet Explorer.
DebugBar DebugBar: Is a toolbar which offers HTML DOM Tree view, HTTP and HTTPS Headers, page cookies view, HTML validation, JS Methods view, JS Execution etc. for Internet Explorer.
Last but not least...
These are probably worth checking out as a solution to aid development and testing within Internet Explorer.