ColdFusion TIPS PLUS
Issue 00088 http://www.cftipsplus.com
I. My CommentsII. ColdFusion In Context: Quick Reset
By R. Martin Ladner
martin.ladner@knology.net
I. Comments:
I am having fun with a new product... well this product is not new, it is just new to me.
HTML/OS (http://www.htmlostips.com)
I created the website because I think it is very cool and a great tool to use. The company at http://www.aestiva.com has a new book out that gives you a evaluation copy of HTML/OS to play with. I have purchased the book in advance at Amazon. The release date is around the corner so you could have your own copy of HTML/OS to play with and create applications.
Ok... Ok... Why is HTML/OS so cool? HTML/OS is similar to ColdFusion however it has features that are totally different. For example the most radical but very useful one is the fact that the database is in the application. So when you create an application for sale you can truly sale the application and keep the code safe from being copied. For example to when you create an application you can make it where it will not work but on ONE domain. This keeps people from coping your app and using it everywhere. Also when encrypting it uses your domain name and the domain name to which it will be placed to create the unique key.
To find out more go check out my website at http://www.htmlostips.com. Please signup it is free and look at the site post messages on the forum.
Keep Coding,
Nathan Stanford
http://www.cftipsplus.com
http://www.htmlostips.com
If you have suggestions for articles send them to us.
If you would like to write for cftipsplus.com
send us an email to:
admin@cftipsplus.com
IF YOU WANT TO BE AN AUTHOR SEND IN YOUR COLDFUSION TIPS.
Remember this is a great way to get your name known in the
ColdFusion Community.
If you have any suggestions please email me at
cftips@nsnd.com.
II. ColdFusion in Context: Quick Reset
By R. Martin Ladner
martin.ladner@knology.net
Suppose you've been doing database work or changing memory variables as part of your application, and now the database is hung or your memory variables are in an uncertain state. This short tip will give you ways to quickly reset your environment so you can proceed with coding and troubleshooting.
Database Reset
One way to regain control of a hung datasource is to send it a query that will cause a database error. Here is such a query. It doesn't look like much, but it can save you a half-hour or so waiting for a connection to drop naturally. I call it bumpdb.cfm.
<cfquery name="bump" datasource="context">
select
</cfquery>
Memory Reset
Suppose your code writes to a memory variable and you want to remove the variable so you can start fresh. Here's an example that will do that. I called it noticeaq.cfm; because, I wanted to quit working with an application variable named "notice".
It doesn't clear the entire structure. It deletes a specific element from the structure. Remember if you're emulating this approach that application and session variables are contained in structures but that client variables are not. (They "fake it".)
<cfapplication name="Notice" sessionmanagement="no">
<cflock name="crasher" timeout="30">
<cfset dummy=structDelete(application,"Notice")>
</cflock>
I hope these hints help you when you need it most. Happy Hunting!
=Marty=
Publisher and Creator:
Nathan Stanford,
admin@cftipsplus.com
http://www.cftipsplus.com
Macromedia and ColdFusion are U.S. registered trademarks.
Copyright (c) 2000 - 2001 C.F. Concepts, Inc.
CFTIPSPLUS.COM and NSND.COM
Permission is granted to circulate this publication via
MANUAL forwarding by email to friends provided that the text is
forwarded in its entirety and no fee is charged.