[thelist] No Escape from ColdFusion

Rory.Plaire at wahchang.com Rory.Plaire at wahchang.com
Mon Aug 27 14:10:49 CDT 2001


| How about Replace(foo["bar"], "'", "''", "ALL")

Joshua,

Mmmm... that's a good one. I kind of thought about this a little, but was
thinking from the side of JS on the client side, not the server side...

Yea, just saw Raymond's next post. This would be a good UDF, looping through
the fields of the structure and escaping the single quotes. I think I've
wanted to investigate the intricacies of UDFs anyway...

Well, I was going to render a laughable quip about the negative response
from Raymond and leave a tip, but now everyone gets a tip without the joke!
(What was that loud exhaling-like sound?)

Thanks for the guidance!

<rory disposition="nap time already!" alt="|)"/>

<tip type="SQL Server Stored Procedures" author="anonymous -- didn't want
identity associated with MS" comment="No offense to MS, its just that, well,
they are a little troubling right now. Kind of like wearing Nikes.">

Creating Stored Procedures in the little box that SQL Server gives you is
somewhat depressing. Sure, the little box color codes the commands and,
after all, you _can_ resize it, unlike other, horrible and painful
experiences to grievous to mention with similar boxes. But, there is a total
lack of editing tools, it disables the rest of the Enterprise Manager
console while you use it, and, even more destructive, no "save" feature in
case someone determines that the server needs rebooting, again, and thinks
to give everyone bounties of working on the inner, character benefits of
patience, forbearance, fortitude, sacrifice, work-life balance and
moderation, etc. by simply hitting that reset button.

While these qualities are good, it may be counterproductive to allow someone
or something else to monopolize your spiritual development. Look at the
history of religion, for example. To save yourself from this despair, and
the agony of the sequence -- 

you: click "OK." 

SS: "Bonk! Your SQL is complete garbage, try again!" 

you: type-type-type, comment, comment. 

SS: "Ha! You call this code! Shame, shame on you!"

you: <whimper> type-type, slash star, page down, star slash

boss: "Hey! Where _are_ you, the meeting started!" 

you: click "OK."

SS: "I'm sorry, I just can't accept that a page full of comments constitutes
a stored procedure. I demand _real_ code." 

you: <sob> 

... then try creating the code in the Query Analyzer! Yes, free with your
Dee-lucks copy of SQL Server is this nice tool which not only does the save
you need, but color codes as well! If you act now, you can also check the
code without executing it AND highlight only the code you want executed and
press F5, bingo-bango, you execute only that code! Wow! Great for testing
that 1000 line Stored Proc... All free (previous purchase of Super Sized SQL
Server absolutely required)!


</tip>




More information about the thelist mailing list