关于0x80040e14错误

错误

为什么我会得到一个0x80040e14的错误信息?

This error is thrown up by the underlying OLEDB Provider. The actual error message is:
The command contained one or more errors
The error message that you see on the screen will vary depending on the MDAC that you have installed and the actual cause of the error.

There are a number of possible causes:
Scenario 1 - Syntax error in FROM clause
Scenario 2a - Syntax error in INSERT INTO statement
Scenario 2b - Syntax error in UPDATE statement
Scenario 3a - Syntax error (missing operator) - caused by ' mark
Scenario 3b - Syntax error (missing operator) - incorrect delimiters
Scenario 4 - Syntax error - division by zero error
Scenario 1 - Syntax error in FROM clause
This commonly occurs when you have a table name that is a reserved word or your table name contains a space (eg "table 1").

Certain words (like table, field, date, select, password, level etc) are reserved by either ADO, OLEDB or by Access for use as commands or system objects.

You can get a list of reserved words in Access from the online help. The Microsoft Platform SDK outlines ADO/OLEDB reserved words.

You should never use these words as names for tables or fields nor should you have spaces in your tablenames. It is recommended that you rename your offending tables/fields and adjust your SQL statement accordingly.

If this is not possible you should enclose your offending table names with [ ] marks, eg
SELECT field1
FROM [table]
Scenario 2a - Syntax error in INSERT INTO statement.
This commonly occurs when your field name is a reserved word (see scenario 1 above). Adjust your field names and SQL statement accordingly and you should avoid the problem.

If you can't adjust your fieldnames you can use [ ] marks to delimit the field names, eg
INSERT INTO table1
([field], [password])
VALUES ('value1', 'value2')
Scenario 2b - Syntax error in UPDATE statement.
This has the same cause as Scenario 2a immediately above.

Scenario 3a - Syntax Error (Missing Operator)
This is commonly caused when some value that you are trying to SELECT/UPDATE etc contains a single quote mark. The error that you receive looks like:
Microsoft JET Database Engine (0x80040e14)
Syntax error (missing operator) in query expression 'Name = 'O'Malleys''.
Because of the presence of the ' in the name O'Malleys the database engine thinks that you are constructing a WHERE clause like:
WHERE name = 'O'
and doesn't know what to do with the rest of the name (Malleys). To solve this problem you need to use the Replace() function and replace all single quotes with two single quotes. It is recommended that you put the Replace() function above into a user-defined function and call as necessary within your page. Click here for an example of such a function.

Scenario 3b - Syntax Error (Missing Operator) - incorrect delimiters
This error can also be caused when attempting an INSERT or UPDATE SQL statement and you have used incorrect delimiters.

Field Type (Access) Field Type (SQL Server) Delimiter
Text Char, varChar '  
Numeric Any numeric type <none>  
Date/Time Any Date/Time # (Access), ' (SQL Server)  

UPDATE table1
SET someTextField = 'someTextValue',
someNumericField = 5
someDateField = #01/01/2000#
Scenario 4 - Division by Zero
Dates need to be delimited with # marks when passed to the Jet Database Engine. This marks them as a date literal. Access then takes the literal date and converts it into a number. Alternatively, you can pass an integer to Access, and Access will construct a date based on that number.

However if you do this:
SELECT field1
FROM table1
WHERE field1 = 01/01/00
Access will treat this as an integer - namely 1 divided by 1 divided by 0, resulting in a division by zero error. Instead you need to write your SELECT query as:
SELECT field1
FROM table1
WHERE field1 = #01/01/00#  

时间: 2024-09-16 13:43:03

关于0x80040e14错误的相关文章

大灰狼的ASP工具箱——asp的错误集合

错误|集合|集合   ActiveServerPages,ASP0126(0x80004005)-->找不到包含文件 MicrosoftOLEDBProviderforODBCDrivers(0x80040E21)-->sql语句出错(数据类型不匹配或表名(字段名)错误或表处于编辑状态,或表不存在于conn打开的数据库中)MicrosoftOLEDBProviderforODBCDrivers(0x80040E14)-->sql语句出错(字段名错误,或数据类型不匹配)MicrosoftO

ASP初学参考:常见错误代号解释

参考|初学|错误 ActiveServerPages,ASP0126(0x80004005)-->找不到包含文件 MicrosoftOLEDBProviderforODBCDrivers(0x80040E21)-->sql语句出错(数据类型不匹配或表名(字段名)错误或表处于编辑状态,或表不存在于conn打开的数据库中) MicrosoftOLEDBProviderforODBCDrivers(0x80040E14)-->sql语句出错(字段名错误,或数据类型不匹配) MicrosoftO

asp 开发应用中错误收集参考文档

开发应用中错误收集参考文档 错误类型: adodb.field (0x800a0bcd) bof 或 eof 中有一个是"真",或者当前的记录已被删除,所需的操作要求一个当前的记录. 原因:你在利用sql查找数据库教程的记录时,查找结果为空,而且你没有对空记录的情况做出处理. 解决:1 如果你不相信查找结果为空,那你应该考虑你的sql语句是否正确;2 如果确实有空的情况,那你应该添加"if rs.eof then"或者"do while not rs.eo

ASP常见错误详解及解决方案小结 推荐第1/2页_应用技巧

有三种主要的错误类型: 1.编译错误: 这种错误出现一般都是代码的语法问题.因为编译错误而导致辞ASP停止运行. 2.运行错误: 这个错误是发生在你准备运行ASP时的.例如:如果你试图给一个变量赋值,但是却超出了该变量允许的范围. 3.逻辑错误: 逻辑错误是最难被发现的,这种错误经常是一种结构错误,电脑是发现不了的.这就需要我们彻头彻尾地检查我们的代码. 因为编译错误一般是和逻辑错误一起发生的,一般都能显示出来,所以我们担心的就只是运行错误.它都终止ASP的运行,而且给用户丢下一堆很不友好的文字

asp,VBscript语法错误,史上最全最详细最精确第1/3页_ASP基础

ASP错误总结  -------------------------------------------------------------------------------- Microsoft VBscript语法错误(0x800A03E9)-->内存不足 Microsoft VBscript语法错误(0x800A03EA)-->语法错误 Microsoft VBscript语法错误(0x800A03EB)-->缺少 ':' Microsoft VBscript语法错误(0x800

Microsoft VBScript 编译器错误 错误原因 代码大全_应用技巧

Microsoft VBScript 编译器错误 错误 '' 缺少语句 ActiveServerPages,ASP0126(0x80004005)-->找不到包含文件 MicrosoftOLEDBProviderforODBCDrivers(0x80040E21)-->sql语句出错(数据类型不匹配或表名(字段名)错误或表处于编辑状态,或表不存在于conn打开的数据库中) MicrosoftOLEDBProviderforODBCDrivers(0x80040E14)-->sql语句出错

asp程序错误详细说明例表

平时写程序的时候出错时的解决方法,不太全,但是一般问题应该都有了,呵呵,欢迎大加添加新的错误信息及解决方法ActiveServerPages,ASP0126(0x80004005)-->找不到包含文件MicrosoftOLEDBProviderforODBCDrivers(0x80040E21)-->sql语句出错(数据类型不匹配或表名(字段名)错误或表处于编辑状态,或表不存在于conn打开的数据库中)MicrosoftOLEDBProviderforODBCDrivers(0x80040E1

[Microsoft][ODBC Microsoft Access Driver] 语法错误 (逗号) 在查询表达式 &amp;amp;#x27;id = 83, 79&amp;amp;#x27; 中。

问题描述 错误类型:MicrosoftOLEDBProviderforODBCDrivers(0x80040E14)[Microsoft][ODBCMicrosoftAccessDriver]语法错误(逗号)在查询表达式'id=83,79'中./web/admin/gedanxiugai.asp,第105行修改页面代码<%varRecordset1=Server.CreateObject("ADODB.Recordset");Recordset1.ActiveConnection

各位老师帮忙看一下,为什么会出现 语法错误 (逗号) 在查询表达式这中错误呢?

问题描述 不理解的地方,第一次更新是正常,第二次更新就会提示错误代码了.如果我把浏览器记录清除,又可以了,再打开又不行了.帮忙看下哦~!万分感谢~!错误代码如下:MicrosoftOLEDBProviderforODBCDrivers(0x80040E14)[Microsoft][ODBCMicrosoftAccessDriver]语法错误(逗号)在查询表达式'id=1,1'中./Xiaofei/Mod_xf.asp,第138行代码如下:第138行的代码是:Recordset1.Open()完整