易截截图软件、单文件、免安装、纯绿色、仅160KB

MS Access语法错误信息

MS Access语法错误信息
This short article deals with the following common MS Access-related error messages:
Syntax error (missing operator) in query expression 'field='some_partial_string'
Syntax error in INSERT INTO statement
Syntax error in UPDATE statement
Syntax error in from clause
Syntax error in WHERE clause
There are 4 main causes for these errors: using a Reserved Word for a field name; embedded spaces in field or table names; attempting to insert unescaped single quotes; and incorrectly delimited datatypes. There is a fifth cause, and that is a genuine syntax error resulting from a typo, or otherwise misconstructed SQL statement. Assuming that you are sure this fifth cause is not applicable in your case, here's how to deal with the other four.
Reserved Words and Embedded Spaces
The most common culprits among reserved words are NAME and PASSWORD, which at first glance appear to be perfectly reasonable choices for field names in, say, a User table. What can be more confounding is that PASSWORD doesn't appear on this list of reserved words in Access. However, the fact is that in an ASP.NET application, you aren't dealing with an Access database. It's actually a Jet 4.0 database, and there is a separate list of reserved words for Jet 4.0 that does indeed include PASSWORD (but not NAME). Best advice is to familiarise yourself with both lists (and the one for Sql Server Reserved Words too) and avoid using any of them as a habit. However, if you can't change your field names, you will have to srround them with [ ] brackets:
Select [name], [password], emailaddress from Users
The same resolution applies to embedded spaces in field names: change them or surround them in [ ] brackets:
Select [user name], userpassword, [email address] from Users
When using the Query Builder within Visual Studio or Visual Web Developer, you will find that all field names are surrounded by brackets by default.
Unescaped Single Quotes and Incorrect Datatype Delimiters


相关文档:

Access数据库操作类

Access数据库操作类AccessHelper
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb ......

文摘《'excel导入access》

'excel导入access ,引用ADO
Private Sub Command1_Click()
    Dim conn As ADODB.Connection
    Set conn = New ADODB.Connection
    On Error Resume Next
    conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source ......

access中case替代方法

access中case替代方法
2009-12-26 14:01
SELECT
UserPassportID as PassportID,
UserID,
GrantorID,
Case ObjectTypeID
When 1 then ObjectID
End
as TerminalID,
Type, Flag, GrantDate, Validate, Invalidate
from UserPassport
在SQL里能执行,但在Access里总提示语法错误(操作符丢失).在查询表达式'Case O ......

解决asp utf 8 access中文乱码一例

 文件头用了
<%@Language="VBScript" CodePage="65001"%>
文件本身已经是Utf-8的编码了
提交过到Access库中怎么都是 “&#20135;&#21697;&#20171;&#32461 ”这样的编码
一步步分析,不存库直接输出,也是这样的编码。想来跟Access无关了。
相于迷惑,后来重新建一个表单元,提交 ......

国外主机ACCESS错误80004005

Microsoft JET Database Engine error '80004005'
Selected collating sequence not supported by the operating system.
是因为国外的主机不支持MDB文件默认的汉语拼音排序方式
只要把排序改为常规,如下图:
然后依次点击 工具 -> 数据库常用工具 -> 压缩和修复数据库
应该就可以正常使用了.
上文来源于 KinJ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号