Microsoft KB Archive/248932

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Article ID: 248932

Article Last Modified on 11/25/2002



APPLIES TO

  • Microsoft Access 2000 Standard Edition



This article was previously published under Q248932

Advanced: Requires expert coding, interoperability, and multiuser skills.

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


SYMPTOMS

When you are using a parameterized stored procedure as the initial record source for a form (by setting both the RecordSource and the UniqueTable properties of the form to the stored procedure), and you then change the record source of the form (by setting both the RecordSource and the UniqueTable properties of the form to a different data source, such as a table or query), and you then set the record source of the form back to the stored procedure (by setting both the RecordSource and the UniqueTable properties), when you view the form in Form view, or you close the form, you may receive one of the following error messages, and then Access quits:

In Windows 95 or 98

This program has performed an illegal operation and will be shut down.

If the problem persists, contact the program vendor.

When you click Details (on Microsoft Windows Millennium Edition, press ALT+D), you receive the following message:

MSACCESS caused an invalid page fault in module MSACCESS.EXE at 015f:3003436d.

NOTE: The actual memory address may vary.

In Windows NT

MSACCESS.EXE - Application Error The instruction at "0x3003436d" referenced memory at "0x039c05d4". The memory could not be "written".

NOTE: The actual memory address may vary.

NOTE: In Microsoft Windows 2000, you do not receive and error message, but Access does quit unexpectedly.

CAUSE

When you initially set the RecordSource property of the form to a parameterized stored procedure, and you expand the UniqueTable property (by opening the combo box), Microsoft Access tries to execute the stored procedure to retrieve the specified unique table. But, the execution of the parameterized stored procedure is not successful. When you then change the record source of the form to a different record source (a table or a query), and you view the form in Form view, or you try to close the form, Microsoft Access quits and produces an error message. Because the UniqueTable property does not successfully execute the parameterized stored procedure, Microsoft Access quits.

RESOLUTION

To resolve this problem, obtain Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a).

To obtain SR-1/SR-1a, click the article number below to view the article in the Microsoft Knowledge Base:

245025 OFF2000: How to Obtain and Install Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a)


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft Office 2000 SR-1/SR-1a.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample project NorthwindCS.adp. Be sure that you are connected to a valid NorthwindCS database on Microsoft SQL Server 7.0.
  2. Create the following stored procedure, and then save it as CustOrders:

       CREATE PROCEDURE CustOrders
           @EnterCustomer varchar(5)
       AS
       SELECT Customers.CompanyName, 
              Customers.ContactName,
              Customers.Address,
              Orders.*
       FROM Customers INNER JOIN
             Orders ON Customers.CustomerID = Orders.CustomerID
       WHERE Customers.CustomerID = @EnterCustomer
                        
  3. Create a new form. Set the RecordSource property of the form (on the Data tab) to the CustOrders stored procedure. Look at the combo box list for the UniqueTable property (also on the Data tab). Note that you cannot set the UniqueTable property of the form because the stored procedure is parameterized.
  4. Change the RecordSource property of the form to the Customers table.
  5. Set the UniqueTable property to Customers.
  6. Set the RecordSource property back to CustOrders.
  7. View the form in Form view. When you are prompted for the parameter, type alfki.
  8. Close the form. When you are prompted to save the form, click either Yes or No.

Note that you receive one of the error message mentioned in the "Symptoms" section.


Additional query words: pra ipf gpf access violation msaccess exe

Keywords: kbbug kbpending KB248932