我在Windows 7 64位上使用Coldfusion 9,0,0,251028和Microsoft Access 97數據庫。INSERT INTO語句包含以下未知字段名稱
當我運行此查詢:
<cfquery name="put_in_info" datasource="#db#">
insert into news
(is_current, display, mes_dat,mes_tim,mes_sub,mes_text,scrollshow,exp_dat)
values
(1,1, #createodbcdate(now())#, #createodbctime(now())#, '#subject#', '#message#',1, #session.expdate#)
</cfquery>
我得到這個錯誤:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'exp_dat'. Make sure you have typed the name correctly, and try the operation again. The error occurred in H:\Inetpub\pvalert.com\listserver\admin\templates\post_breaking.cfm: line 26
Called from H:\Inetpub\pvalert.com\listserver\admin\new_process.cfm: line 54
Called from H:\Inetpub\pvalert.com\listserver\admin\templates\post_breaking.cfm: line 26
Called from H:\Inetpub\pvalert.com\listserver\admin\new_process.cfm: line 54
24 : (is_current, display, mes_dat,mes_tim,mes_sub,mes_text,scrollshow,exp_dat)
25 : values
26 : (1,1, #createodbcdate(now())#, #createodbctime(now())#, '#subject#', '#message#',1, #session.expdate#)
27 : </cfquery>
28 :
VENDORERRORCODE
-1507
SQLSTATE
HYS22
SQL
insert into news (is_current, display, mes_dat,mes_tim,mes_sub,mes_text,scrollshow,exp_dat) values (1,1, {d '2011-04-11'}, {t '17:49:09'}, 'Test message - please ignore', 'This is a test message, please ignore. ',1, {ts '2011-05-15 00:00:00'})
DATASOURCE
rpv_list
Exp_dat是,我需要更新表的截止日期欄。
我嘗試刪除「會話」。在expdate變量上,並且什麼也沒做。同樣,爲了消除第24行「exp_dat」周圍的任何空格。
我跑的SELECT語句獲取所有行,然後: 並獲得: DISPLAY,** EXP_DAT **,ID,IS_CURRENT,MES_DAT,MES_SUB,MES_TEXT,MES_TIM,SCROLLSHOW 因此,似乎該列確實存在 –
2011-04-12 17:40:35