coldfusion

How to Execute 2 or more insert statements using CFQuery in coldfusion?

Is it possible to Execute 2 insert or Update Statements using cfquery? If yes how? if no, what is the best way to execute multiple queries in Coldfusion, by opening only one Connection to DB. I think every time we call cfquery we are opening new connection DB ...

In Coldfusion / CFML, how do you format a long decimal number to a standard two number percentage?

In Coldfusion / CFML I need to convert 0.85035035035 to 85%. I looked at numberFormat(), but it's output looks like, "0.85". There doesn't seem to have a method to omit the leading "0.". <cfset myNumber = 0.85035035035> <cfoutput> #numberFormat(myNumber, "0.00")#% </cfoutput> Outputs: 0.85% Ideas? Do I need to trim the leading 2 ...

Should I Use CFINCLUDE or CFSAVECONTENT inside CFC.

It seems like the standard MVC approch (as it relates to ColdFusion) is to make the view files .cfm and do a CFINCLUDE inside of the cfc that ultimately processes the view. Does this break the Object Orientation of cfc's? Does this cause the CFML compiler to have to compile the view everytime? Is there a strong reason to NOT make th...

What is a Coldfusion Session?

I've used Coldfusion sessions for quite a while, so I know how they are used, but now I need to know how they work, so that I can plan for scaling my website. Is a Coldfusion user 'session' simply a quick method to setup 2 cookies (CFTOKEN and CFID) and an associated server side memory structure? (the SESSION scope) Does it do anything ...

Is it Possible to have File Exists and is not readable?

I have a requirement, which says, If file exists and is not readable then Update in DB with file path and some Status. Is it possible to Have File Exists and is not readable? Is Yes, How to identify through coldfusion such type of files, I know we can identify if it is exists or not, but i wanted to know, how to identify If it is r...

What could be causing these error?

I am seeing a very large number of the errors below in my log files. Nothing seems to be causing them in the way that none of our users are seeing any errors. What could be causing them? We are running CF 8. FYI: They are happening many times per second. 12/11 12:30:13 error jrunx.scheduler.SchedulerService.cancel() java.lang.NoSuchMet...

Are there any good free online ColdFusion tuturials?

I have some new students starting soon and what I have always done in the past is just throw them in the deep end to learn ColdFusion. I usually give them a very small project that has most of the common ColdFusion "parts". Is there a better/faster way for them to get the basics? What would be great is an hour or two online tutorial they...

How do I reset application.cfc without resetting the server instance?

How do I reset a Coldfusion Application / application.cfc without resetting the Coldfusion Server instance? If I remember right, there are a few tricks out there such as creating a reinit function within application.cfc or renaming the file. ...

How Can I get the URL parameter & Value in Coldfusion?

How Can I get the URL parameter & Value in Coldfusion? for Ex:- my URL is test.cfm?par1=val1&par2=val2&par3=val3 Is it possible to get the second parameter and its value directly? with <cfset param='#url.par2#'> I can get value of par2, But my parameters are dynamicically generated from other page and passed to here (par2 may be n...

LCDS with ColdFusion without Flex

Is there a way to do BlazeDS/LCDS and ColdFusion polling without the need to use Flex to connect to them to achieve pseudo-"realtime"? ...

redirection code for cfm script

Hi friends, I need a CFM script to place on my website homepage. If a visitor arrives from a search engine using a a certain search phrase, I want to redirect them to various pages. For example: The following searches would redirect to the following pages: become a business coach -> http://www.businesscoach.com/BusinessCoaching.html...

ColdFusion Socket Gateway

What is the performance like on a Socket Gateway for CF? EDIT : i meant to ask the way its built is it built to for large scale applications or just demo purposes. I.e 2000+ users being connected to it, but small amounts of data coming in and going at various times. ...

Can I convert a .swf file to an image format?

Hi all - I need to take a .swf Flash file, ideally from a URL (but I can read the file from disk also) and create an image preview of it (png, gif or jpeg is fine). I am using Adobe Coldfusion 8 so I'm looking for a Java solution. I need to get the first frame of the Flash movie only. Many thanks in advance. EDIT: I need to do th...

What can you do in ColdFusion in a single line?

Is there a way of writing this logic in a single, elegant line of code? <cfif ThumbnailWidth EQ 0> <cfset Width = 75> <cfelse> <cfset Width = ThumbnailWidth> </cfif> ...

With Coldfusion, how do you handle dynamicaly generated URLs?

(Update: I converted this question to a community wiki as the answer appears more subjective than I thought it would. There are multiple answers depending on one's needs.) If I have a folder that only includes application.cfc and index.cfm, what is a fast, reliable method to handle dynamically generated URLs? i.e. URLs that do not have ...

Is there an Oracle Open Cursor (ORA-01000) leak in ColdFusion?

Hi, using CFMX7 and Oracle 10g ent on a query-intensive and active web site, I'm having a problem that some of the Oracle connections in my web server connection pool are accumulating open cursors. (In JDBC parlance this might be called a ResultSet object leak.) This is a confusing situation in Oracle; read here for an explanation. htt...

CFdump cfcomponent cfscript

Hi Can one use cfdump inside a cfcomponent? Can one use cfdump inside a cfscript? I know the anser is no then how can one emit the values of the functions insde cfcomponent cfscript? I am using CF8 ...

In a Coldfusion cfc, what is the scope name for variables set outside of a function?

In a Coldfusion component / CFC, I want to properly scope some variables to be available for all contained functions, but to be hidden or blocked from outside scripts. What is the name of the cfc's memory scope? Is it 'variables'? Is that available inside a contained function? Is it blocked from outside the cfc? (Examples in CF 8) Call...

Nested complex-type elements never get populated when calling AXIS-based web service from .NET

I've been trying for a couple of days now to get a .NET client working fully with a Web Server provided by my Coldfusion-based web app. I'm not a .NET developer, per se, but I happen to have a copy of VS 2003, which seems like it should do the trick. I can use a simple multiplier() method in my web service that takes two numbers and ret...

How do I find/replace � (unicode replacement character) in ColdFusion?

What CFML will replace � with another character of my choice? ...