易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

mysql Access Denied无法访问的问题

mysql 明明已经装好了,但是无法访问。链接的时候 总是说
Access Denied.
解决方法:
用mysqld --skip-grant-table启动mysql
然后在mysql库中执行这个
INSERT INTO user VALUES ('localhost', 'root', PASSWORD('some_pass'), 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y', 'Y', ......

Access、Hybrid和Trunk三种模式的理解

Access、Hybrid和Trunk三种模式的理解
预备知识:
Tag,untag以及交换机的各种端口模式是网络工程技术人员调试交换机时接触最多的概念了,然而笔者发现在实际工作中技术人员往往对这些概念似懂非懂,笔者根据自己的理解再结合一个案例,试图向大家阐明这些概念
untag就是普通的ethernet报文,普通PC机的网卡是可以识别这 ......

Tip 64位系统上使Web程序可访问Access数据库

问题:目前还没有64位的Jet oledb provider
(不知以后有否),在64位系统上调用Jet oledb provider时会遇到如下错误:
"The
'Microsoft.jet.OLEDB.4.0' provider is not registered on the local machine.
"
解决:32位的Jet oledb provider是存在的,那么可以利用IIS的32 Mode特性,将web程序运行在32位模式 ......

了解Access安全性

简介
在早期版本的 Microsoft® Access(Microsoft Access 2000 以前)中,有关安全性的知识有时被认为是无法为任何人所掌握和应用的。您需要按顺序执行很多步骤,一旦遗漏某个步骤或者颠倒了顺序就会带来灾难性的后果。随着 Microsoft Access for Microsoft Windows® 95 的 Security Wizard 出现,以及 Microsoft ......

access中的类型转换函数

每个函数都可以将表达式 (表达式:算术或逻辑运算符、常数、函数和字段名称、控件和属性的任意组合,计算结果为单个值。表达式可执行计算、操作字符或测试数据。)强制转换为特定的数据类型 (数据类型:决定字段可拥有的数据类型的字段特征。数据类型包括 Boolean、Integer、Long、Currency、Single、Double、D ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号