Microsoft KB Archive/162072

= FIX: SELECT - SQL from Table with 252 Fields Causes Page Fault =

Article ID: 162072

Article Last Modified on 2/4/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition

-



This article was previously published under Q162072



SYMPTOMS
Issuing a SELECT - SQL statement using a table that has more than 251 fields may cause Visual FoxPro to terminate with an Invalid Page Fault.

NOTE: This behavior has been duplicated with as few as 190 fields under a variety of conditions (projects open, variables in memory, and so forth). The exact number of fields that causes this behavior may vary.



RESOLUTION
The workaround to the Invalid Page Fault is to perform the SQL SELECT as identified in the second and third SELECT statements in the "Steps to Reproduce Behavior" section below. SELECT *, .T. FROM -or- SELECT * FROM INTO CURSOR NOFILTER



STATUS
This problem has been fixed in Visual FoxPro 5.0a.



MORE INFORMATION
Issuing a SELECT - SQL statement using a table that has more than 251 fields may cause Visual FoxPro to terminate with an Invalid Page Fault. The following code creates a table with 252 fields, inserts a single record, and performs three different SQL SELECT statements. Generally, the first SELECT statement causes an Invalid Page Fault.

Steps to Reproduce Behavior
Create and run a program with the following code: fldlist="("  FOR i = 1 TO 251        fldlist=fldlist+"fld"+ALLTRIM(STR(i))+" C(5),"   ENDFOR

fldlist=fldlist+"FLD"+ALLTRIM(STR(i))+" C(5))"

valuelst="" valuelst=valuelst+REPLICATE("'"+'DATA'+"', ",i-1)+"'DATA'"

CREATE TABLE manyflds FREE &fldlist INSERT INTO manyflds VALUES (&valuelst)

SELECT * FROM manyflds       && Causes an Invalid Page Fault in VFP 5 SELECT *,.T. FROM manyflds   && Works fine SELECT * FROM manyflds INTO CURSOR temp NOFILTER && Works fine

Keywords: kbbug kbfix kbvfp500afix kbprogramming KB162072

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.