Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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', ......

ÓÃJavascriptÁ¬½ÓAccessÊý¾Ý¿âµÄ·½·¨

±¾ÎĽéÉÜjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨¡£Õâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ¬ÔÚÏßÔòÐèÒª×ã¹»µÄȨÏÞ¡£ÓÉÓÚ²ÉÓÃAccessÊý¾Ý¿â£¬ËùÒÔ²¢²»Ê¹Óñê×¼µÄSQLÓ﷨ʹÓÃʱ¡£ÐèҪעÒâ¡£
Õ⼸Ìì·ÑÁËͦ´óÁ¦ÆøÔÚÍøÉϲéÕÒjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨£¬¾­¹ýÕûÀí×ܽᣬÖÕÓÚд³öÒ»¶ÎÄܹ»ÓÐЧִÐеĴúÂë¡£
µ«ÊÇÕâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ ......

Access±£Áô×Ö

Access±£Áô×Ö&±äÁ¿ÃûÁÐ±í£¬½¨±íʱӦ±ÜÃâʹÓÃÕâЩ´Ê»ãºÍ·ûºÅ¡£
-A
ADD
ALL
Alphanumeric
ALTER
AND
ANY
Application
AS
ASC
Assistant
AUTOINCREMENT
Avg
-B
BETWEEN
BINARY
BIT
BOOLEAN
BY
BYTE
-C
CHAR, CHARACTER
COLUMN
CompactDatabase
CONSTRAINT
Container
Count
COUNTER
CREATE
C ......

Á˽âAccess°²È«ÐÔ

¼ò½é
ÔÚÔçÆÚ°æ±¾µÄ Microsoft® Access£¨Microsoft Access 2000 ÒÔǰ£©ÖУ¬Óйذ²È«ÐÔµÄ֪ʶÓÐʱ±»ÈÏΪÊÇÎÞ·¨ÎªÈκÎÈËËùÕÆÎÕºÍÓ¦Óõġ£ÄúÐèÒª°´Ë³ÐòÖ´ÐкܶಽÖ裬һµ©ÒÅ©ij¸ö²½Öè»òÕߵߵ¹ÁË˳Ðò¾Í»á´øÀ´ÔÖÄÑÐԵĺó¹û¡£Ëæ×Å 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ºÅ