ACC: Errors When RunSQL Action Argument Exceeds 256 Characters

Last reviewed: May 28, 1997
Article ID: Q109355
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

The RunSQL macro action argument can accept up to 256 characters. However, you receive no error message that tells you when you have exceeded this limit. Instead, the SQL string is truncated at 256 characters and Microsoft Access attempts to parse the first 256 characters. This can cause a variety of error messages, including:

  • Syntax error in WITH OWNERACCESS OPTION declaration.
  • Syntax error in query expression.
  • Missing semicolon (;) at end of SQL statement.
  • Syntax error in FROM clause.

The error message you receive depends on where the string was truncated.

CAUSE

Note that these errors occur when you manually enter a SQL string with more than 256 characters. If you paste a string with more than 256 characters, Microsoft Access will notify you that you have exceeded the limit with the following error message:

   Text would be too long; change canceled.

STATUS

This behavior no longer occurs in Microsoft Access version 7.0.

RESOLUTION

Paste in the string to confirm the error, and then shorten the SQL string to less than 256 characters.


Additional query words: macros
Keywords : kbusage McrArg
Version : 1.0 1.1 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.