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



The information in this article applies to:

  • Microsoft Access 2000

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.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Open the sample project NorthwindCS.adp.
  2. Enter the following in the stored procedure designer:
    Create Procedure "UndeclaredVariables"
    As
       Set @a = 1
       Set @b = 2
       Set @c = 3
       Set @d = 4
       Set @e = 5
    Return 
    					
  3. 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.

Modification Type:MajorLast Reviewed:6/30/2004
Keywords:kbbug KbClientServer kbfix KB266728