FIX: SQL Query Returns Different Result Set with Korean Window

Last reviewed: February 16, 1998
Article ID: Q157187
3.00 3.00b WINDOWS kbenv kbprg kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b

SYMPTOMS

A SQL SELECT statement with a WHERE clause returns an unexpected result set if Visual FoxPro for Windows is running under Hangeul Windows 95 (Korean Windows 95). Similar results have been reported when using German Windows 95 or German Windows NT.

WORKAROUND

There are two ways around this problem. Use the HAVING clause instead of the WHERE clause in the SQL SELECT statement, or issue the SET COLLATE TO MACHINE command before executing the SELECT statement.

If the index field is required, then use the SET COLLATE command on the Korean or German setting and build whatever indexes are needed in this collating sequence for normal operations, such as relationship and seeks. Before running a query, temporarily set the collation sequence to machine, and execute the query, but don't order it. Then set the collation sequence back to Korean, and do a query on the result set and ORDER BY the desired order.

STATUS

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

MORE INFORMATION

Steps to Reproduce Behavior

Create two tables. The table structures are as shown below :

Structure

Table1             Table2
Field1   C10       Field1   C10
Field2   C10       Field2   C10

Contents

Table1             Table2
Field1  Field2     Field1  Field2
111     222        111     222
222     333        222     444
333     333        333     222
444     111        222     11
555     333        555     333

Issue the following command:

   SELECT * FROM Table1,Table2 ;
      WHERE Table1.Field1 = Table2.Field1 ;
      AND Table1.Field2 = Table2.Field2

Run Visual FoxPro for Windows 3.0b under Korean or German Windows 95 and the query returns an empty cursor, but it returns the correct result set if the query is executed under other Windows 95 platforms.


KBCategory: kbenv kbprg kbbuglist kbfixlist
KBSubcategory: FxenvOs
Additional reference words: 3.00 3.00b kbdse VFoxWin
Keywords : FxenvOs kbbuglist kbenv kbfixlist kbprg
Version : 3.00 3.00b
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 16, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.