Title:
Bug 82800:Hi,it seems as if CFs QueryTableMetaData class does not correctly use the underlying JDBC specification when it comes to read meta data from the used JDBC driver
| View in TrackerStatus/Resolution/Reason: Closed/Won't Fix/
Reporter/Name(from Bugbase): Dirk Eismann / Dirk Eismann (dirk eismann)
Created: 05/04/2010
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Win All
Vote Count: 1
Problem:
Hi,it seems as if CFs QueryTableMetaData class does not correctly use the underlying JDBC specification when it comes to read meta data from the used JDBC driver.In my case the resulting CF query object of a SQL query returned the wrong column names. More specifically, the columns in the database define label declarations (used for reporting / output stuff). These label names get used by CF instead of the technical / logical names of the column.E.g. in the database table TEST there's a column "name" with a label "The user's name". When I do a cfquery<cfquery name="q"> select * from test</cfquery>I do see in my JDBC driver (which I step debug in Eclipse), that CF invokes the public String getColumnLabel(int paramInt) throws SQLExceptionmethod of my ResultSetMetaData implementation to get the columns name. This will then of course won't be "name" (as expected) but "The user's name"Accessing column names that way does not work as you can imagine. Even worse, when I do a<cfquery name="q"> select name from test</cfquery>the query object q does *not* have a property "name", i.e. this fails<cfset foo = q.name>According to the JDBC specification, to query the name of a column, the method public String getColumnName(int paramInt) throws SQLExceptionshould be used, wheraes getColumnLabel(int paramInt) "Gets the designated column's suggested title for use in printouts and displays." (quote)Dirk.
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041406
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: Dirk Eismann
External Customer Email: 450F45AE446034F8992015D5
External Test Config: 05/04/2010
Attachments:
Comments: