Saturday, July 31, 2010    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< Jul 2010 >>
S M T W T F S
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
             

Search

Categories
 • Acrobat (5) [RSS]
 • Adobe (96) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (66) [RSS]
 • AdobeMAX09 (39) [RSS]
 • AdobeMAX10 (7) [RSS]
 • AIR (233) [RSS]
 • Appearances (198) [RSS]
 • Books (78) [RSS]
 • CFEclipse (15) [RSS]
 • ColdFusion (1409) [RSS]
 • ColdFusion Builder (9) [RSS]
 • Data Services (36) [RSS]
 • Fish Tank (5) [RSS]
 • Flash (248) [RSS]
 • Flex (513) [RSS]
 • Home Automation (5) [RSS]
 • Jobs (119) [RSS]
 • JRun (14) [RSS]
 • Labs (47) [RSS]
 • LiveCycle (35) [RSS]
 • MAX (238) [RSS]
 • Mobile (138) [RSS]
 • Regular Expressions (18) [RSS]
 • RIA (21) [RSS]
 • SQL (42) [RSS]
 • Stuff (543) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (164) [RSS]

Other BLOGs
 • Charlie Arehart
 • Lee Brimelow
 • Ray Camden
 • Christophe Coenraets
 • Sean Corfield
 • Mihai Corlan
 • Cornel Creanga
 • Mark Doherty
 • John Dowdell
 • Danny Dura
 • Enrique Duvos
 • Steven Erat
 • Kevin Hoyt
 • Serge Jespers
 • Adam Lehman
 • Duane Nickull
 • Miti Pricope
 • Andrew Shorten
 • Ryan Stewart
 • James Ward
 • Greg Wilson
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Entry / Main
November 24, 2004

Blackstone And Access To Final SQL

This one has bugged me for a long time. ColdFusion allows you to build SQL statements dynamically (using variables, expressions, conditions, and more), but have you ever wanted to know exactly what that final generated SQL was? ColdFusion obviously knows what it is, and if you have debugging turned on then it gets displayed (I even wrote a UDF to return the SQL string, but it only works if debugging is turned on), but thus far it has never been exposed to us developers. Well, this should be changing in Blackstone, along with RecordCount and ColumnList and ExecutionTime, there'll be additional data exposed, including the final SQL statement. (Note that I said "should", not "will").

Yet another example of one of the many infrequently discussed goodies in the works.

Comments
Fantastic! Any help we can get on identifying which files caused the errors, where they are, and the sql necessary to reproduce it the better.

I'd like to request that when CFCs are called, and they return a record set that there be an easier way to dump the record set into the debugging stream also. For instance, we use a CFC with a stored procedure in it all we see in the debugging is 'recordset 1' instead of the actual data returned.
# Posted By Ryan | 11/25/04 1:00 AM
WOW!
I will love blackstone so much... ;)
# Posted By Fernando da Silva Trevisan | 11/25/04 10:12 PM
This feature would be AWESOME. I have wanted that for as long as I have been using CF!!!
# Posted By Jacob | 11/29/04 8:46 AM
Please let it be so! I'd so love to be able to easily turn on a SQL logging facility (which I wrap around my data access layer code) w/o having to turn on debugging!
# Posted By Greg | 12/6/04 11:56 AM
This would be really great but would it be as plain text? If this could be colour-coded in cfdump, it would be really useful.
# Posted By Richard | 12/8/04 11:42 AM
Richard, it is plain text. And honestly, I am not sure I'd like formatting in there, although your suggestion that CFDUMP color code SQL is an interesting one.
# Posted By Ben Forta | 12/8/04 12:07 PM
Thanks for the quick response.
I agree the query should be returned plain text. But cfdump colour-coding the sql would be a God send.

If it can go one step further and highlight the points where ColdFusion variables were used in the SQL, it would be awesome, though I don't know how practical it would be to implement.
# Posted By Richard | 12/8/04 12:39 PM

  © Copyright 1997-2009 Ben Forta, All Rights Reserved