Advertisement

08.10.2005 at 10:53AM PDT, ID: 21522590
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

#DSN#

Asked by psenn in ColdFusion Application Server

Tags:

In many CF examples, I see the dataSource is specified with a variable, such as
<cfquery datasource="#DSN#" name="TEST">
The rational has been to assign the variable once and reuse it in every reference to the datasource rather than hard code it.
To me, hard coding it didn't seem to be that big of a burden - just use a global search and replace if you change your mind.  Besides, the dataSource name is only a pointer to the data source defined in cfide/administrator.
It was when I started cutting and pasting examples that I saw the wisdom of using a variable instead of hard coding my dataSource name.  I don't want search engines spidering my keyword dataSource name if I use it in a Newsgroup or Experts-Exchange.  By using a variable, I can keep my examples generic.

Now, the question is: What is the BEST way to specify the dataSource name?
Define it once on application startup in the Application scope?
Define it upon every onRequestStart using the Request scope?
Define it as a Session variable?  
Define it as a a Client variable?
Define it as a Form variable?
Define it as a Variables variable?
Define it with the THIS keyword?
Define it as an URL variable?  (OK, now I'm getting a little bit ridiculous).

An unacceptable answer is "it depends".
For the purpose of this discussion, the dataSource name will be static throughout all the pages on the site.
If you are stuck on the "it depends" answer, then choose a scenario and address it, but don't answer with "Depends".

Start Free Trial
[+][-]08.10.2005 at 11:04AM PDT, ID: 14644695

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: ColdFusion Application Server
Tags: specifying
Sign Up Now!
Solution Provided By: pegarm
Participating Experts: 4
Solution Grade: A
 
 
[+][-]08.10.2005 at 11:05AM PDT, ID: 14644702

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.10.2005 at 11:06AM PDT, ID: 14644725

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.10.2005 at 01:36PM PDT, ID: 14646208

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.10.2005 at 01:52PM PDT, ID: 14646344

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.10.2005 at 02:51PM PDT, ID: 14647005

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.10.2005 at 05:06PM PDT, ID: 14648017

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32