简体   繁体   English

CF9错误执行数据库查询

[英]CF9 Error Executing Database Query

I am getting this error and don't understand why: 我收到此错误,但不明白为什么:

Error Executing Database Query . 错误执行数据库查询 [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'buildno'. [Macromedia] [SQLServer JDBC驱动程序] [SQLServer]无效的列名'buildno'。 The error occurred in C:/data/wwwroot/webappsdev/cfeis/redbook/redbook_bio_load.cfm: line 10 错误发生在C:/data/wwwroot/webappsdev/cfeis/redbook/redbook_bio_load.cfm:第10行

  8 : select * 9 : from redbook_bio 10 : where build_num = '#session.build_num#' 11 : </cfquery> 12 : 

VENDORERRORCODE: 207 供应商错误代码:207
SQLSTATE: 42S22 SQLSTATE:42S22
SQL: select * from redbook_bio where buildno = '4700' SQL:从redbook_bio中选择*,其中buildno ='4700'
DATASOURCE: xxxx 资料来源:xxxx
* ** * ** " * ** * **

It is saying buildno is an invalid column name, but I do not have that name in my query. 这是说buildno是无效的列名称,但是我的查询中没有该名称。 I used to, but changed both the column in the database and the column name in the query to build_num. 我曾经使用过,但是将数据库中的列和查询中的列名称都更改为build_num。 You can see my exact code with line numbers, and that there is no 'buildno' in there. 您可以看到带有行号的确切代码,并且那里没有“ buildno”。 But looking at the SQL statement below that, it is still trying to use 'buildno'. 但是看下面的SQL语句,它仍在尝试使用“ buildno”。

I had my editor check the directory for anywhere it says buildno and no results came back. 我让编辑器检查目录中是否显示buildno任何地方, buildno返回任何结果。 I have restarted the CF Service and cleared the cache. 我已经重新启动CF服务并清除了缓存。 Why would it still be trying to run it with buildno instead of build_num like the code says? 为什么仍要尝试使用buildno而不是如代码所示的build_num来运行它?

There was a cfquery cache setting in the Administrator. 管理员中有一个cfquery缓存设置。 We had it set to 100. Apparently clearing the cache template and component cache doesn't clear the cfquery cache. 我们将其设置为100。显然清除缓存模板和组件缓存不会清除cfquery缓存。 I changed the query name and it fixed the problem. 我更改了查询名称,并解决了该问题。 It most likely could have been fixed by setting the cfquery cache value to 0. 可以通过将cfquery缓存值设置为0来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM