dcs
Member since Dec 11, 2008
- Profile: /members/291-dcs.htm
- URL: http://www.thefaberfamily.com/search-smith
- Comments: 25
Recent Blog Comments By dcs
-
Using ColdFusion Structures To Remove Duplicate List Values
Posted on Mar 22, 2013 at 9:31 AM
Late to the party but figured I would add my two cents anyway. How about a way to count the occurrences of each value in the list, before or during the conversion to a struct key list? I would imagine that one would use listValueCount() (or listValueCountNoCase()), e.g.: <cfset ... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on Oct 21, 2010 at 11:13 PM
@Ben, It may be possible to clear a single cached query now - I'm not sure. (There is a quick-and-dirty way of doing it -- making a small change to the SQL -- but I don't think that was what you had in mind. :)) However, even if you have to clear all your cached queries, this is no worse than hav... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on Oct 20, 2010 at 10:47 PM
@Ben et al., Cached queries are absolutely pure gold. They're what you want to use when (a) you have a lot of memory (they take up space in memory, after all) and (b) you have a set of data that doesn't change frequently or that doesn't need to be real time. For example, suppose you're writing a fr... read more »
-
Learning ColdFusion 9: IsNull() And Working With NULL Values
Posted on Aug 2, 2010 at 4:47 PM
Ultimately, it looks like ColdFusion 9's new IsNull() method is nothing more than a short-hand notation for StructKeyExists(). Pardon me for being so late to the discussion - and I apologize if the point has already been covered - but I believe isNull() is slightly more awesome than structKeyExist... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on Jan 5, 2010 at 11:58 AM
That kind of performance difference is odd and goes beyond my understanding of SQL optimization mechanisms. Mine too - thankfully we have a DBA who can look at the access paths and make adjustments accordingly.... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on Dec 16, 2009 at 9:38 PM
I'm not a ColdFusion developer, I'm the Oracle DBA. I work with 3 Cold Fusion Developers. I can extract the query out of ColdFusion, run it in pl/sql developer and it returns in about 15 seconds. We recently had a similar issue on one of our ORACLE servers and it turned out to be one of the initia... read more »
-
Ask Ben: Ending ColdFusion Session When User Closes Browser
Posted on Oct 15, 2009 at 10:33 AM
Yes, if you expire the cookies (as shown a couple of posts above) a new session will be created. Don't delete the keys from the session scope, however: <!--- What NOT to do ---> <cfset structDelete(session, "CFID") /> <cfset structDelete(session, "CFTOKEN") />... read more »
-
Ask Ben: Ending ColdFusion Session When User Closes Browser
Posted on Oct 15, 2009 at 8:55 AM
Neither on a new tab or a new window, because the cookies (both the CFID and CFTOKEN persistent ones and the JSESSIONID memory-resident one) will still be accessible to the browser.... read more »
-
Ask Ben: Testing The Existence Of A Query Column In CFScript
Posted on Sep 24, 2009 at 9:40 AM
The answer is so easy that I wonder if that's what the original author actually meant, and that perhaps Mr. Mejia is on the right track. However, the original author did ask for a CFSCRIPT solution, which would require running a query in a CFSCRIPT block. This is easy in CF9 with the Query.cfc objec... read more »
-
Ask Ben: Ending ColdFusion Session When User Closes Browser
Posted on Aug 18, 2009 at 8:41 PM
I have never used J2EE session variables. Does that force a session-only cookie by default? Or is something more complicated going on behind the scenes? Regular ColdFusion sessions are identified by persistent cookies, CFID and CFTOKEN; while J2EE sessions are identified by a cookie, JSESSIONID, t... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on Jun 5, 2009 at 1:37 PM
Hmmm, well, as a practical matter I would just avoid using CFQUERYPARAM for that query - just make sure you verify your parameters to avoid SQL injection (which isn't as much of a problem with Oracle as it is with SQL Server anyway).... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on Jun 5, 2009 at 11:43 AM
Have you tried running the query in ColdFusion without CFQUERYPARAM? That would give you more information as to whether CFQUERYPARAM is the actual cause.... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on May 6, 2009 at 9:41 AM
There are performance gains associated with CFQUERYPARAM if the underlying DBMS supports bind variables and the query statement is executed multiple times. For example, if you use bind variables in Oracle, it will check to see if there is an existing execution plan for the SQL statement, whereas if ... read more »
-
ColdFusion CFQueryParam Binding vs. SQL Execution
Posted on Apr 6, 2009 at 5:03 PM
Re: Clearing the query cache - set the max number of cached queries in CF administrator to zero. I don't think you even have to reload the page once you do this, though I generally do to make certain. I find this a heck of a lot easier than making edits to my queries (I am picky about whitespace) ev... read more »
-
Getting The Requested URL From The Page Request Object (Servlet) Without Using CGI
Posted on Jun 23, 2008 at 10:50 PM
I tried using this for a CF custom 404 page and instead of returning the URL that occasioned the 404 error it returned the URL of the 404 page itself (even though that is not what is displayed in the browser)! Currently I am using CGI.query_string in order to return the errant URL but this solution ... read more »
-
Ask Ben: Converting a Query to an Array
Posted on Jun 20, 2008 at 8:48 AM
Yes, if you need to dynamically access the columns. Couldn't one also use the evaluate() function to dynamically access the columns? E.g., <cfset temp = evaluate("MyQuery.#variables.col#[#index#]")> IIRC, inside a CFLOOP or CFOUTPUT of MyQuery one would only need to do the following: <... read more »