PRB: Error Generated Through Interface Clears READ EVENTSID: Q143284 3.00 3.00b WINDOWS kbprg kbprb The information in this article applies to:
SYMPTOMSIf an error is generated through the interface at a time when program execution is halted on a READ EVENTS, selecting Ignore from the dialog clears the READ EVENTS. Alternately, having an ON ERROR routine without a RETRY causes the same behavior.
CAUSEIf an error occurs, selecting Ignore moves program execution to the next line of code. If an ON ERROR routine is used, execution also resumes at the next line of code if no RETRY command is issued.
RESOLUTIONConditionally execute a RETRY after testing for which line of code is active when the error occurs.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior and ResolutionThis example uses the Customer table from the \VFP\samples\data\Testdata database. The READ EVENTS is placed in a procedure by itself. A RETRY is conditionally executed within the error handler when an error occurs and the program name passed to the error handler is the procedure containing the READ EVENTS. 1. Create a new program containing the following code, and name it 2. Create a new form. Add the Customer table to the Data Environment of the
3. Place the following code in the Destroy event procedure code for the
4. Set the BufferMode of the form to 1 - Pessimistic.
5. Add a command button to the form, and place the following code in its 6. Change the Caption property of the command button to Close.
7. On the File menu, click Save, and save the form as Readtest.scx. 8. Run the Readtest.prg program. Make a change to the first record in the 9. Start another instance of Visual FoxPro. Run the program in the new
10. Go back to the first instance of Visual FoxPro, and close the form.
11. Edit Readtest.prg, and remove the * from the RETRY command in the 12. Repeat steps 8 and 9. The form will not be exited in the second
Notes:
|
Last Reviewed: February 1, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |