FIX: Large Cursor Causes Data Corruption with SQLEXEC (258734)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q258734 SYMPTOMS
When browsing a cursor that is created from an ODBC datasource that contains a large number of records, several records at the end of the cursor display CHR(0) as the data.
CAUSE
This problem is related to the amount of memory available to Visual FoxPro. When Visual FoxPro is running low on memory, it attempts to flush buffers to disk, which increases the size of the file on disk. The file structure that has the file size in it, however, is not updated. When Visual FoxPro reads the file, the shorter file size returns an empty buffer containing zeros.
RESOLUTION- Maximize the buffer size by setting both the SYS(3050,1) and the SYS(3050,2) functions to the value of SYS(1001).
- Where possible, when you are using queries or views involving ODBC data sources containing large result sets, avoid moving other application windows in front of Visual FoxPro. Also, avoid opening the Class Browser, the Project Manager, or the designers when you are using these queries or views.
- If updateable views are involved, the corruption may be detected by using either of the following methods:
- Use a LOCATE FOR AT(CHR(0), theField)>0 command to find any corruption in the cursor.
- Place an update trigger on the table to check for the existence of CHR(0) in the affected column (presuming that CHR(0) is not valid content for this column) and fail the update if it is detected.
- Work with smaller cursors, bringing down a smaller subset of the data, unless it is necessary to retrieve of the entire table.
STATUSThis problem was corrected in Microsoft Visual FoxPro version 7.0 for Windows.
Modification Type: | Major | Last Reviewed: | 10/15/2002 |
---|
Keywords: | kbBug kbCodeSnippet kbDatabase kbDSupport kbvfp700fix KB258734 |
---|
|