Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
Ask The Training Staff
Ask The Training Staff

I hope that all of you are enjoying your summer and getting in plenty of R&R. If you aren't, I hope you have at least upgraded to the new CF Server 5.0.

Not that this is better than a week at the beach, but it should certainly bring a little joy into your life because of some of the new features! Anyway, upgrade if you haven't already, start playing with the new features, and keep those questions coming. Here are some I've answered recently.

Q: How can I use CF to dynamically generate (out- put) special ASCII characters, such as the tab or line break characters?
A: The easiest way to do this is by using the Chr() function. Simply plug in the ASCII value of the character you want generated. For example, for a tab character, use #chr(09)# in your code. If you're not sure what the ASCII code is for the character you want, use this simple code to loop through all the values:

<cfoutput>
<cfloop from="1" to="256" index="i">
ASCII Code #i#: #chr(i)#<br>
</cfloop>
</cfoutput>
Q: You said in your class to avoid using a text file as a data source, but I have a situation where I need to do that. How do I use a text file as a data source in CF?
A: Even though it's a bad situation, it's a good question. The first thing you need to understand is how to create the data source. When creating the data source in the CF Administrator, avoid the temptation to point it to the actual file. Create your data source so it's pointing only to the subdirectory that the file is in. If you point it to the actual file, the connection will fail.

Once the data source is created in CF, you can query the file using the CFQUERY tag as you would for any other database. The biggest difference is in the FROM clause in your SQL. Here's where you'll use the name of the file. For example:

<CFQUERY NAME="MyQuery" DATASOURCE="TextTest">
SELECT Column1, Column2, etc...
FROM MyTextData.txt
</CFQUERY>
Q: In CF Studio, when I go to click on one of the resource tabs (like the database tab), it frequently unlocks the tab from the rest of the resource area, which is really annoying. Is there a way to stop this?

A: I know exactly what you mean and I agree that it's very annoying! If you're using Studio 4.5.2 there's a way to stop this "feature." Go to the Options menu and choose Settings. In the lower-right corner of the main screen there's an option called "Lock Tabs". If you check this box, your resource tabs will stay where they are and your life will be less stressful!

Q: I've upgraded to CF Server 5.0 and am trying to view the examples for the new CFGRAPH tag, but nothing ever shows up. What am I doing wrong?
A: The CFGRAPH tag is a cool addition to Cold-Fusion, but it doesn't work unless you start a separate service called the ColdFusion Graphing Server. By default this service is not started automatically. If you're running Windows NT or 2000, go to the Service Manager, start the service, and then try the examples. They should work now.

Q: What's the best way to clear out a cached query?
A: It depends on how you cached it. If you used the CACHEDWITHIN attribute of the CFQUERY tag, you can run the same query with CACHEDWITHIN="#CreateTimeSpan(0,0,0,0)#". This will refresh the query. If you cached the query using a persistent variable scope, such as session or application, you can use the StructDelete() function to remove the query from the scope. For example, if you cached the query using something like <cfquery name= "Application.MyQuery"...>, you can delete it using this statement:

<cfset tmp = StructDelete-(Application,"MyQuery")>
Please send your questions about ColdFusion (CFML, CF Server, or CF Studio) to AskCFDJ@sys-con.com. Please visit our archive site at www. NetsiteDynamics.com/AskCFDJ.
About Bruce Van Horn
Bruce Van Horn is president of Netsite Dynamics, LLC, a certified ColdFusion developer/instructor, and a member of the CFDJ International Advisory Board.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Latest Cloud Developer Stories
Swisscom, the Swiss telecom, is going into the cloud business. Its subsidiary Swisscom IT Services AG has signed up with Red Hat as a Certified Cloud Provider and launched a public cloud Infrastructure-as-a-Service (IaaS) cloud targeting enterprise-class customers primarily in ...
Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP)....
In a surprise move on Tuesday, January 10, Oracle wheeled out its Big Data Appliance. That’s the one it said in October would be ready sometime in the first half. Only nobody believed it meant early in the first half. Heck, it’s not even clear anybody thought Oracle could make ...
Rackspace Hosting, the service leader in cloud computing, on Thursday announced its acquisition of SharePoint911, an industry leader in SharePoint consulting, training, and "JumpStart" services within SharePoint. The unification of both companies provides capabilities to deliver ...
CloudLinux, Inc., on Thursday released CafeFS 3, a virtualized file system for shared hosters that cages each customer within its own virtualized file system. CageFS becomes part of CloudLinux OS at no additional charge. CloudLinux OS, the only commercially-supported Linux OS m...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE

Breaking Cloud Computing News
United Data Technologies (UDT), has developed a unique set of social media specific solutions that w...