coldfusion

Which is faster? An empty statement or a return

I've always been curious about this. Between the two code example which is more processor efficient? I understand that various languages may be different and I need to know what the answer is in PHP, but I am also curious about javaScript, CFScript, and ActionScript if the answer would be different. Thanks ps:The example may not be exa...

Is there a utility for finding SQL statements in multiple files and listing any referenced tables and stored procedures

I'm currently looking at a terrible legacy ColdFusion app written with very few stored procedures and lots of nasty inline SQL statements (it has a similarly bad database too). Does anyone know of any app which could be used to search the files of the app picking out any SQL statements and listing the tables/stored procedures which are ...

How do I put a cftooltip around a table row?

I'm trying to put a tooltip on a table row so that when you hover over any part of the row the tooltip displays. When I put the cftooltip tag around the entire table it works, and when I put it within a td element it works, but nothing displays when I put it around td or tr elements. Any suggestions? Thanks! ...

Coldfusion popularity

Hi, I've heard of Coldfusion being a server side technology for web app dev. Are there any statistics as to how widely it is used as opposed to PHP, Java Servlets and JSP or ASP.NET? Are there any special features in coldfusion that make learning it worth the while? Thanks, jrh PS: please don't close this question as argumentative. ...

extend Application.cfc, but not from the root

I have: 1. inetpub/wwwroot/ProjectName/Application.cfc 2. inetpub/wwwroot/ProjectName/Admin/Application.cfc I want #2 to extend #1 and override the onRequest function. I've looked into Sean Corfields's ApplicationProxy.cfc solution, but that is if your project is in the root folder, which mine isn't. ...

How to handle error.VCollectionNotAvailableException: Collection down after opening. (10) in ColdFusion?

Hi, everyone. I am using ColdFusion 9, with create a verity collection name 'shopColl'. I create a task schedule to call a CFM file to do indexing this collection every 5 minutes. but I found this error when I try to refresh index in collection: An error occurred while performing an operation in the Search Engine library.; DETAIL:The ...

Evaluate function

Is there a better way to write the following? <cfloop list="#qry.Columnlist#" index="FieldName"> <cfset "form.#FieldName#" = Evaluate("qry.#FieldName#")> </cfloop> This loop is assigning every field in the query to a corresponding form field. I understand the evaluate function is shunned. ...

C# & CF: Design Time Attributes

I'm using compact framework 3.5 and pocket pc 2003 platform. I'm writing a custom control for my application. Some properties I want to be exposed as design-time attributes. The way it is described in MSDN (http://msdn.microsoft.com/en-us/library/tk67c2t8.aspx) is not actually working. I get: The type or namespace name 'CategoryA...

Regular Expression Help.

I wrote a Regular Expression that generates a url like /abc/deutschland/bbs-tagesfahrten/betz-mode-frotier-center-–-tress-teigwaren.html. Now I want to replace the repeating dashes with the single on. How Can I? ...

Looping over lists in cf9

Page 116 of the developer's guide says "Unlike the cfloop tag, CFScript for-in loops do not provide built-in support for looping over queries and lists." Q: How do I loop over a list using the new script syntax in ColdFusion 9? <cfloop list="#qry.Columnlist#" index="FieldName"> <cfset form[FieldName] = qry[FieldName][1]> </cfloop> ...

EntitySave Insert Scope_Identity

In ColdFusion 9, after doing an EntitySave, I'd like to get the value of the primary key that was inserted (provided of course that EntitySave did an Insert). In the old days I would SELECT * FROM tablename WHERE PK = SCOPE_IDENTITY() And this would give me all the fields, including the defaults that SQL Server had assigned. ...

Strategy/recommendations of using CFPARAM

Each time when using cfparam I have a kind of feeling that I put it in the wrong place or generally mis-using. Consider this example, say we need to show the new entity form (with default input values): <cfparam name="form.attachLink" default="" /> <input type="text" name="attachLink" value="#HTMLEditFormat(form.attachLink)#" /> Eve...

Date Display problem in ColdFusion

When I retrived a Date field in TOAD it displayed like is '1/18/2038 9:14:07 PM', But when I rertrived in Coldfusion using cfquery and displayed using , then I got the date on screen like '2038-01-18 21:14:07.0'. Does anyone have idea why it displayed in different format? Is there anyway we can make it display like TOAD format? I am...

Why does a long cfc file work in CF8, but not CF9? Getting "Branch target offset too large for short" error.

I have a fairly long cfc file, about 1800 lines long, that worked fine in ColdFusion 8, but after upgrading my development system to ColdFusion 9 and doing some testing I get a compile error for a cfc and the message says "Branch target offset too large for short". I modified the file to eliminate some unused functions and consolidated o...

unable to pass boolean value

I have a form field/checkbox and am unable to pass the boolean value even though it is selected. <input type="checkbox" name="IsContactValid" id=" IsContactValid" <cfif ContactView.GetIsContactValid()>CHECKED </cfif>> that will be transmitted to ...

How do I return JSON data using jQuery.post() to a Coldfusion 8 cfc?

How do I post a form using jQuery.post() to a Coldfusion.cfc method and return json data? Is there a certain way I need to format the url or form values in order to specify the cfc method to invoke remotely? How do I tell Coldfusion to return json data? I've searched the existing jQuery/Coldfusion.cfc questions and I'm looking for some ...

Programmatic Way To Link Text Within A PDF

I am looking for some way to code a function (I'm open to any language or library at this point) to take an already existing PDF file as input and return a modified PDF file that links certain words to different URLs. I know PHP and ColdFusion both have good tools for dealing with PDF's, but I haven't been able to find anything that wor...

cfdirectory on a ColdFusion Mapping

Guys/Gals, I am trying to use CFDirectory to get a file listing of a mapping created in ColdFusion Admin. So far I cannot get the list to populate, but if I reference the physical path the full file list is displayed. Here's the code I'm using: <cfoutput> <cfdirectory action="list" directory="mymapping" name="test"><cfdump var="#test#"...

How to display clickable formatted text in .NET CF?

Hi, I'm doing a kind of dictionary for .NET CF. I'm trying to display formatted text in which all (or some) words are 'clickable' -- in which I means if one clicks on it, it should fire an event telling me which word was clicked. However, .NET CF 3.5 only supplies me with WebBrowser, which I could use for displaying formatted text, but...

MYSQL with Coldfusion - Solutions to create Search Capabilites?

I'm using MySQL & ColdFusion. Currently for searching TEXT fields I'm using LIKE in the database. Luckily my database is empty but soon the table will fill up and I fear I the LIKE SQL query will kill my app. I'm looking for a solution that works with both MySQL & ColdFusion that will allow me to scalably offer search capabilities with ...