Microsoft KB Archive/141354

= FIX: Adding Description to Table's Index in DBC Corrupts Table =

Article ID: 141354

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q141354



SYMPTOMS
Using Project Manager to add a description to a table's index when that table is part of a database (.dbc file) corrupts the database. You have to run the VALIDATE DATABASE command on the database container to repair it.



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



Steps to Reproduce Problem
  In the Command window, type the following commands: SET EXCLUSIVE ON  CREATE DATABASE mydata MODIFY DATABASE mydata  Add a new table, and add the first and last name fields to the table. Name the table Mytable . Create a regular index on the last name field. You do not need to add any data to the table. Close the Database Designer.  In the Command window, type: CREATE PROJECT myproj  Add Mydata to the project.</li> Expand the data section to expose the fields and index for the table you created. With the index expression selected in the project, right-click and select Edit description. Enter any description.</li>  Close the project, and in the Command window type: CLOSE ALL CLEAR ALL </li> Re-open the project and try to edit the database. Visual FoxPro will return the error message:

FILE C:\VFP\mydata.dbc is an invalid database.

</li></ol>

Example Resolution
The following steps should resolve this problem. Note that thes steps have been performed under Windows NT only; they have not been tested on other platforms.

<ol> Close the project, and ensure that Mydata is open.</li>  In the Command window, type: VALIDATE DATABASE RECOVER </li>  Visual FoxPro will return the following information: <pre class="fixed_text">  Validate Database MYDATA: Rebuilding structural index.... Index rebuilt Object #8 (Index 'lastname'): Bad property types or lengths: 1. (Fixed) </li></ol>

Your description will be removed from the index and you can now make additional modifications to the table.

Keywords: kbbug kbfix kbvfp500fix KB141354

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.