Ok, so I should be working on my novel right now, but I thought I’d share a quick ColdFusion tip (not original with me).

Imagine that you want to use the column names from your query to populate the header row in an Excel file.  If you use myquery.columnlist, you’ll get the list of column names, but they’ll be in alphabetical order…and in all caps.

An easy way around this is–surprise, surprise–to tap into some of the Java beneath the query object.  The following will get you the column list as an array, in the proper order, and respect the column name casing:

columns = myquery.getMeta().getcolumnlabels()

Ok, back to the book! 🙂