Microsoft KB Archive/171272: Difference between revisions
(importing KB archive) |
m (Text replacement - "<" to "<") |
||
Line 57: | Line 57: | ||
An application error has occurred and an application error log is being generated.<br /> | An application error has occurred and an application error log is being generated.<br /> | ||
VFP.exe<br /> | VFP.exe<br /> | ||
Exception: access violation | Exception: access violation <error number>, Address: <memory address>. | ||
</div> | </div> | ||
Line 98: | Line 98: | ||
CLOSE ALL | CLOSE ALL | ||
USE HOME()+"Ztest.dbf" | USE HOME()+"Ztest.dbf" | ||
DELETE ALL FOR RECNO() | DELETE ALL FOR RECNO() < 10 | ||
USE | USE | ||
SET DELETED ON | SET DELETED ON |
Revision as of 17:24, 20 July 2020
Article ID: 171272
Article Last Modified on 8/14/1999
APPLIES TO
- Microsoft Visual FoxPro 5.0 Standard Edition
This article was previously published under Q171272
SYMPTOMS
Using a SQL-SELECT statement to populate an array from a FoxPro 2x table containing deleted records with DELETED set on causes the operating system to close Visual FoxPro 5.0.
When running under Windows 95, the following error appears:
In Windows NT 4.0, the following error appears:
In both cases, the operating system then closes Visual FoxPro.
RESOLUTION
Do not issue a SET DELETED ON command and simply rewrite the SQL-SELECT statement, as in the following example:
SELECT * FROM ZTEST INTO ARRAY Zjunk WHERE DELETED()=.F.
-or-
SELECT * FROM ZTEST INTO ARRAY Zjunk WHERE !DELETED()
Also, the results of the SQL-SELECT statement could be directed to a destination other than to an array.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual FoxPro 5.0a and does not occur in Visual FoxPro 3.x.
MORE INFORMATION
Steps to Reproduce Behavior
Run the following code in a program file or line by line from the Visual FoxPro Command window:
CLEAR SET SAFETY OFF USE HOME()+"samples\data\customer.dbf" EXCLUSIVE COPY TO HOME()+"Ztest.dbf" TYPE FOX2X SET SAFETY ON CLOSE ALL USE HOME()+"Ztest.dbf" DELETE ALL FOR RECNO() < 10 USE SET DELETED ON SELECT * FROM HOME()+"Ztest" INTO ARRAY Zjunk ? ALEN(zjunk) USE
Keywords: kberrmsg kbbug kbfix kbvfp500afix KB171272