ACC2002: Error with ANSI-92 Reserved Words When SQL Server Compatibility Syntax (ANSI 92) Is Enabled

Article translations Article translations
Article ID: 287417 - View products that this article applies to.
This article was previously published under Q287417
Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access database (.mdb).

Expand all | Collapse all

On This Page

SYMPTOMS

ANSI-92 reserved words generate the following error in queries when the check boxes under SQL Server Compatibility Syntax (ANSI 92) are selected.
Reserved Error (-1001); There is no message for this error.

RESOLUTION

To avoid the error message, use one of the following workarounds.

Workaround 1
  1. View the query in Design view.
  2. Place brackets ([]) around the ANSI-92 reserved words.
  3. Save the query.
Workaround 2

When you design the tables in the database, be careful not to use ANSI-92 reserved words. If a table has a field already defined, consider changing the field name.

Workaround 3

Consider disabling the SQL Server Compatibility Syntax (ANSI 92) option for the database. To disable the option:
  1. On the Tools menu, click Options.
  2. Click the Tables/Queries tab.
  3. Click to clear the check boxes under SQL Server Compatibility Syntax (ANSI 92).

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

The following is a list of ANSI 92 reserved words that are known to generate the error mentioned in the "Symptoms" section of this article.

Collapse this tableExpand this table
ABSOLUTEALLOCATEARE
ATAUTHOZATIONBIT_LENGTH
BOTHCASCADEDCAST
CATALOGCHAR_LENGTHCHARACTER_LENGTH
CLOSECOALESCECOLLATE
COLLATIONCONNECTIONCONTINUE
CORRESPONDINGCROSSCURRENT
CURRENT_DATECURRENT_TIMECURRENT_TIMESTAMP
CURRENT_USERCURSORDEALLOCATE
DECLAREDEFERRABLEDEFERRED
DESCRIBEDESCRIPTORDIAGNOSTICS
DISCONNECTDOMAINEND
END-EXECESCAPEEXCEPT
EXCEPTIONEXTERNALEXTRACT
FETCHFOUNDFULL
GETGLOBALGO
GOTOIMMEDIATEINDICATOR
INITIALLYINPUTINSENSITIVE
INTERSECTINTERVALISOLATION
LANGUAGELEADINGLOCAL
LOWERMATCHMODULE
NAMESNATURALNEXT
NULLOCTET_LENGTHOF
ONLYOPENOVERLAPS
PARTIALPOSITIONPREPARE
PRESERVEPRIORREAD
RELATIVERESTRICTROWS
SCROLLSECTIONSESSION
SESSION_USERSIZESQL
SQLCODESQLERRORSQLSTATE
SUBSTRINGSYSTEM_USERTEMPORARY
THENTIMEZONE_HOURTIMEZONE_MINUTE
TRAILINGTRANSACTIONTRANSLATE
TRANSLATIONUNIQUEUNKNOWN
UPPERUSAGEUSING
WHENWHENEVERWRITE
ZONE

Steps to Reproduce the Behavior

  1. Start Microsoft Access, and then open the sample database Northwinds.mdb.
  2. Create the following table:
       Table: Table1
       ----------------------------
       Field Name: ID
       Data Type: Autonumber
       Indexed: Yes (No Duplicates)
    
       Field Name: Language
       Data Type: Text
    
       Field Name: Location
       Date Type: Text
    
       Table Properties: Table1
       ------------------------
       PrimaryKey: ID
    					
  3. Save the new table as Table1, and then add one record to the table.
  4. Close the Table1 table.
  5. On the Tools menu, click Options.
  6. Click the Tables/Queries tab.
  7. Under SQL Server Compatibility Syntax (ANSI 92), click to select the This database check box.
  8. Create a new query in Design view.
  9. Close the Add Table dialog box without making any selection.
  10. On the View menu, click SQL View.
  11. In the SQL window, type the following SQL statement:
    SELECT Language FROM Table1
  12. Try to run the query.

    Note that you receive the error message that is mentioned in the "Symptoms" section of this article.

Properties

Article ID: 287417 - Last Review: September 27, 2003 - Revision: 3.0
APPLIES TO
  • Microsoft Access 2002 Standard Edition
Keywords: 
kberrmsg kbprb KB287417

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com