FIX: GP Fault or No Records Returned If Invalid Dates in RQBE

ID: Q120792

2.5x 2.6x | 2.00 2.5x 2.6x

WINDOWS   | MS-DOS
kbtool kbprb

The information in this article applies to:

SYMPTOMS

When using the RQBE tool, if you select a date field in the Selection Criteria section and the BETWEEN clause contains an invalid date, FoxPro may return a query with zero records found. If the first date in the EXAMPLE section is invalid, FoxPro returns an "Invalid Date" error. If the second date is invalid, FoxPro runs the query but returns zero records.

When you enter the SELECT statement in the command window or in a program and that SELECT statement contains invalid dates in the BETWEEN clause, no error is returned regardless whether the invalid date is the first or second date.

In addition, FoxPro for Windows can cause a general protection (GP) fault if the second date is invalid. After pressing the ESC key to exit from the browse mode when running DO QUERY, if you press the LEFT ARROW or RIGHT ARROW key, the browse comes back up again with zero records. Then if you press the ESC key to exit from the browse and click the mouse one or more times, a GP fault occurs.

NOTE: This behavior does not occur when using the Visual FoxPro Query Designer.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0 for Windows.

MORE INFORMATION

Steps to Reproduce Problem

1. Open the RQBE tool with a database that has a date in it.

2. In the selection Criteria section, choose the date field and the

   BETWEEN clause.

3. Type a valid date as the first date and an invalid date as the second
   date.

4. Run the Query in Browse mode.

5. Note that the query will have zero records.

6. If running FoxPro for Windows, press the ESC key to exit from browse

   mode.

7. Press the LEFT ARROW or RIGHT ARROW key. The browse will reappear.

8. Press the ESC key again, and click the mouse one or more times. A GP

   fault will occur.

Additional reference words: VFoxWin fixlist3.00 FoxWin FoxDos 2.00 2.50 2.50a 2.50b 2.60 2.60a GPF buglist2.50 buglist2.50a buglist2.50b buglist2.60 buglist2.60a KBCategory: kbtool kbprb KBSubcategory: FxtoolRqbe
Keywords          : FxtoolRqbe 
Version           : 2.5x 2.6x | 2.00 2.5x 2.6x
Platform          : MS-DOS WINDOWS
Solution Type     : kbfix

Last Reviewed: October 21, 1997