Entries for month: December 2010

Blog post 101 and a ColdFusion 101 Series

Best Practices , ColdFusion , Misc , Tips and Tricks No Comments »

To mark the 101st post on my Blog, and to complement my thoughts on what content I wish to publish on my blog in order to keep it current, I have decided that I will be writing some material on the following areas:

  • 101 - ColdFusion variables and scopes, to include complex and simple variable types.
  • 101 - Anatomy of a ColdFusion CFC.
  • ColdFusion by Example - A series of posts that provide examples of some of the most commonly used ColdFusion Tags and Functions grouped by type, with practical examples.
  • Syntax is easy, programming is hard.  A general guide on how to concentrate more on the actual programming side of development rather than getting caught up with the syntax!
It's a tall order, I know, and it'll take discipline in order to keep the momentum going with this, but the idea is to provide some useful output during this process e.g. code snippets \ templates along the way that can be used and altered by anyone (including me) during development.





Bookmark and Share

Microsoft TSQL and the GO Statement

SQL , Tips and Tricks , Gotchas No Comments »

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


Bookmark and Share

Festive Blog Addition

Misc , Javascript No Comments »

If you haven't noticed already...

In the run-up to Christmas, I thought it would be nice to add some festive cheer to the "Homepage" of my blog!

For some reason my preference was to add Christmas lights over any other potential effect.  So here it is.

These lights don't just flash either, you can also smash them with your mouse pointer and alter their size.

To alter their size, simply append any of the following options to the URL:

  • ?size=pico
  • ?size=tiny
  • ?size=small
  • ?size=medium
  • ?size=large

NOTE: There are sound clips used when smashing the lights so please ensure your speaker volume isn't too high (especially if you're in the office!!).

Credit: schillmania.com

 

 

Bookmark and Share

ColdFusion Panel Meeting - Wednesday 8th Dec

ColdFusion , Misc No Comments »

Just a quick reminder that the End of Year ColdFusion Panel of Uber Awesomeness, organised by Ray Camden, will take place on December 8th at 11AM CST, 17:00PM GMT for those of you on UK time.

There will be a FREE Adobe Connect panel discussion with some of the greatest ColdFusion community members.

Full details and the link (which will be posted on Wednesday) can be found at Ray Camdens blog.

UPDATE:
Meeting URL is http://experts.adobeconnect.com/ubercfpanel/




Bookmark and Share
Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds