ColdFusion SQL Error - [Table ....] Is Not Indexable By Name
Posted June 12, 2006 at 6:21 PM
I was helping a co-worker of mine tracking down a ColdFusion error he was getting:
Launch code in new window » Download code as text file »
- [Table (rows 1 columns ID, PREFIX, FIRST_NAME, MIDDLE_NAME, LAST_NAME, SUFFIX, WORKING_NAME): [ID: coldfusion.sql.QueryColumn@c4736a] [PREFIX:
- coldfusion.sql.QueryColumn@17542e7] [FIRST_NAME:
- coldfusion.sql.QueryColumn@17b5ee7] [MIDDLE_NAME:
- coldfusion.sql.QueryColumn@93ab1f] [LAST_NAME:
- coldfusion.sql.QueryColumn@c79c37] [SUFFIX:
- coldfusion.sql.QueryColumn@e0eb96] [WORKING_NAME:
- coldfusion.sql.QueryColumn@8af270] ] is not indexable by name
I hadn't seen this error before, so the phrase "indexable" immediately made me think about full text indexes and primary keys. After several minutes of moving CFTRY/CFCATCH tags around, we finally found a better error message. It said something like the SELECT column 'name' was not a reference in any of the FROM tables. It was suddenly obvious; in his Query of Queries, the 'name' column was not defined. I find it very funny when simple mistakes take a lot of debugging.
On another note though, I think it is very interesting that the error thrown by the Query of Queries CFQuery tag was different than the one available in CFCATCH. Well, maybe not different at the core, but worded very differently.
Download Code Snippet ZIP File
Post Comment | Ask Ben | Permalink | Other Searches | Print Page
Newer Post
SQL LIKE Clause Case Sensitive in ColdFusion MX Query-of-Query
Older Post
XStandard ColdFusion Web Services Solution
Reader Comments
I go this error this morning, however I got it when I tried inserting a structure to a row of a query as in:
<cfset Tmp = StructInsert(QueryName[CurrentRow],OtherQueryName,QueryValue,true)>
I was pretty much trying my luck, half-expected the error. I hope this helps.
I'm working on work-around - thanks!
I recently was faced with the same problem, but for a different reason: I was trying to implement POIUtility into my application and in the ColumnList I left spaces after each comma. Removing the spaces fixed the problem.
@Kamil - thanks for the tip - I just ran into that.



