Microsoft KB Archive/266728

= ACC2000: Unexpected Behavior When You Try to Save a Stored Procedure That Has Numerous Syntax Errors =

Article ID: 266728

Article Last Modified on 6/30/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q266728



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access project (.adp).



SYMPTOMS
When you try to save a stored procedure in an Access project, you see one of the following behaviors:
 * You receive a message box that has no OK button.
 * The stored procedure appears to be saved, but when you close the designer, the application is unavailable for use.

After you experience either of these behaviors, you have to press CTRL+ALT+DELETE to quit Microsoft Access. As a result, the stored procedure is lost.



CAUSE
There are too many errors in the stored procedure.



RESOLUTION
When this problem occurs, you must re-create the stored procedure.

To avoid this problem, when you are designing a stored procedure, copy and paste the stored procedure into Notepad, and then save it as a text file before you try to save the stored procedure in the SQL text editor.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem no longer occurs in Microsoft Access 2002.



Steps to Reproduce the Behavior
 Open the sample project NorthwindCS.adp.  Enter the following in the stored procedure designer: Create Procedure &quot;UndeclaredVariables&quot; As Set @a = 1 Set @b = 2 Set @c = 3 Set @d = 4 Set @e = 5 Return  Try to save the stored procedure.

Note that because these variables have not been defined, you should receive an ADO error message box. Either you receive a message box with no OK button, or the stored procedure appears to be saved. However, if you then close the designer, the application becomes unavailable.

Additional query words: pra

Keywords: kbbug kbfix kbclientserver KB266728

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.