Microsoft KB Archive/286339

= BUG: &quot;Data Type Mismatch&quot; Error After PACK When Used with an IDX File =

Article ID: 286339

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q286339



SYMPTOMS
After you issue a PACK command and then insert records into a table that uses an IDX index file, the following error may occur:

Data type mismatch.



RESOLUTION
To work around this problem, use a structural index instead of an IDX index file.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
  Run the following code that demonstrates the problem: *!* Q286339 PRB: &quot;Data Type Mismatch&quot; Error After PACK When Used With a IDX CREATE TABLE Test FREE (num N(10), gen G) INSERT INTO Test (num) VALUES (1) INSERT INTO Test (num) VALUES (2) USE DELETE FILE Test.idx USE TEST INDEX ON num TO Test FOR num <> 10
 * !* This code illustrates the problem described in the article.

USE Test INDEX Test INSERT INTO Test (num) VALUES (11) DELETE FOR num = 11 PACK INSERT INTO Test (num) VALUES (12) BROWSE  The error shown in the &quot;Symptoms&quot; section appears. After the error occurs, the table appears empty when use the BROWSE command unless you recreate the index. To recreate the index, use the INDEX ON command.

