FIX: Long SQL SELECT WHERE Clause: "SQL Internal Error"

ID: Q105119

2.50    | 2.50
WINDOWS | MS-DOS kbprg kbfixlist kbbuglist kberrmsg

The information in this article applies to:

SYMPTOMS

A Structured Query Language (SQL) SELECT statement with an extremely long WHERE clause can cause the following error message:

   SQL Internal Error

STATUS

Microsoft has confirmed this to be a problem in FoxPro 2.5 for MS-DOS and FoxPro 2.5 for Windows. This problem was corrected in FoxPro 2.5a for MS-DOS and FoxPro 2.5a for Windows.

MORE INFORMATION

Steps to Reproduce Problem

Assuming FoxPro is installed in a directory named FOXPROW on drive C, issue the following code:

   SET DEFAULT TO c:\foxprow\tutorial
   USE customer

   SELECT company FROM customer ;
   WHERE (cno > '10000' .OR. cno < '20000') ;
     .AND. ('A' $ UPPER(company) .OR. 'B' $ UPPER(company) .OR. ;
       'C' $ UPPER(company) .OR. 'D' $ UPPER(company) .OR. ;
       'E' $ UPPER(company) .OR. 'S' $ UPPER(company)) ;
     .AND. ('A' $ UPPER(contact) .OR. 'B' $ UPPER(contact) .OR. ;
       'C' $ UPPER(contact) .OR. 'D' $ UPPER(contact) .OR. ;
       'E' $ UPPER(contact) .OR. 'S' $ UPPER(contact)) ;
     .AND. ('A' $ UPPER(address) .OR. 'B' $ UPPER(address) .OR. ;
       'C' $ UPPER(address) .OR. 'D' $ UPPER(address) .OR. ;
       'E' $ UPPER(address) .OR. 'S' $ UPPER(address)) ;
     .AND. ('A' $ UPPER(city) .OR. 'B' $ UPPER(city) .OR. ;
       'C' $ UPPER(city) .OR. 'D' $ UPPER(city) .OR. ;
       'E' $ UPPER(city) .OR. 'S' $ UPPER(city)) ;
     .AND. ('A' $ UPPER(state) .OR. 'W' $ UPPER(state) .OR. ;
       'B' $ UPPER(state) .OR. 'C' $ UPPER(state) .OR. ;
       'E' $ UPPER(state)) ;
     .AND. (state = 'WA' .OR. state = 'CA') ;
     .AND. (zip > '10000' .OR. zip < '100000')

Additional reference words: FoxDos FoxWin 2.50 buglist2.50 fixlist2.50a errmsg err msg sequel KBCategory: kbprg kbfixlist kbbuglist kberrmsg KBSubcategory: FxprgSql Solution Type : kbfix

Last Reviewed: October 14, 1997