PRB: MODIFY VIEW with Long IN Clause Causes Visual FoxPro to Terminate (266089)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q266089

SYMPTOMS

When you modify a view in the View Designer that contains a long IN clause, Visual FoxPro terminates. Visual FoxPro 6.x either generates a fatal error or terminates without any error message. Visual FoxPro 5.x generates the error message
Mismatched Pushjmp/Popjmp Call
followed by:
.DBC Internal Consistency Error
and then terminates.

RESOLUTION

To resolve this problem, you can:

  1. Reduce the IN clause to a shorter statement

    -or-

    Break the IN clause into two statements and use the .OR. operator to join them together as two separate criteria, such as:
    CREATE SQL VIEW view2 as SELECT *;
     FROM customer!customer1;
     WHERE Customer1.cust_id IN ("ABC11","DBF11","ADF11","DFR11","WDS11","RRR11");
       OR (Customer1.cust_id IN ("GGG11","AFR11","TRE11","YUI11","OUI11","POI11","QWE11"));
     ORDER BY Customer1.cust_id
  2. Break the IN clause into two statements and use the .OR. operator to join them together as two separate criteria, such as:
    CREATE SQL VIEW view2 as SELECT *;
     FROM customer!customer1;
     WHERE Customer1.cust_id IN ("ABC11","DBF11","ADF11","DFR11","WDS11","RRR11");
       OR (Customer1.cust_id IN ("GGG11","AFR11","TRE11","YUI11","OUI11","POI11","QWE11"));
     ORDER BY Customer1.cust_id

MORE INFORMATION

Steps to Reproduce Behavior

  1. Run the following code to create a database and a table:
    CREATE DATABASE customer
    CREATE TABLE customer1 (cust_id C(5), cust_name C(40))
    INSERT INTO customer1 VALUES ("ASD11","John")
    INSERT INTO customer1 VALUES ("OUI11","Smith")
    INSERT INTO customer1 VALUES ("TRE11","Ken")
    INSERT INTO customer1 VALUES ("BRE11","Kenneth")
    INSERT INTO customer1 VALUES ("ABC11","Joe")
    						
  2. While the database is still open, in the Command window, run the following code to create a view:
    CREATE SQL VIEW view2 as SELECT *;
       FROM customer1;
       WHERE Customer1.cust_id IN ;                 
       ("ABC11","DBF11","ADF11","DFR11","WDS11","RRR11", "GGG11","AFR11","TRE11","YUI11","OUI11","POI11","QWE11");
       ORDER BY Customer1.cust_id
    						
    Type the following into the Command window to try to modify view2:
        MODIFY VIEW view2
    						
    NOTE: Visual FoxPro 6.x will error out with fatal error or terminate without any error message.

Modification Type:MajorLast Reviewed:10/16/2002
Keywords:kbBug kbDesigner kbprb KB266089 kbAudDeveloper