tracker issue : CF-3038644

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 77370:cfquery will use "this

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): John Whish / John Whish (John Whish)

Created: 05/20/2009

Components: Database, CFDBINFO

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 235480

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 3

Problem:

cfquery will use "this.datasource" set in the Application.cfc, so shouldn’t cfdbinfo also be able to use it?

Example:

<cfquery name="foo">
SELECT * FROM EMPLOYEES
</cfquery>
<cfdump var="#foo#" />

Works.

<cfdbinfo name="foo" type="tables" />
<cfdump var="#foo#" />

Fails.

Method:

In Application.cfc add:

this.datasource = "cfdocexamples";

In a cfm page add this code

<cfdbinfo name="foo" type="tables" />
<cfdump var="#foo#" />
Result:

Error message:
Attribute validation error for tag CFDBINFO.
When the value of the TYPE attribute is TABLES, it requires the attribute(s): DATASOURCE.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3038644

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: John Whish
External Customer Email: 4B9370D7448AB8BF9920157F
External Test Config: 05/20/2009

Attachments:

Comments:

This bug has been voted..
Vote by External U.
23688 | November 10, 2011 07:20:43 PM GMT
+1 vote. This and <cfstoredproc> and <cfinsert> and <cfupdate> too. Anything that hits the DB, really. -- Adam
Vote by External U.
23689 | November 10, 2011 07:20:44 PM GMT
This bug has been voted..
Vote by External U.
23690 | November 10, 2011 07:20:45 PM GMT
+1 just makes sense to do this
Comment by External U.
23687 | June 30, 2015 02:25:18 AM GMT