Microsoft KB Archive/157253

= FIX: Copying Tables Between Databases Changes Index Type =

Article ID: 157253

Article Last Modified on 10/16/2002

-

APPLIES TO


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

-



This article was previously published under Q157253



SYMPTOMS
Copying a table from one database to another changes the index type of the table from Primary to Candidate.



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



Steps to Reproduce Problem
  Create a database that has a table and a Primary key as following: CREATE DATABASE Test CREATE TABLE Tst1T1 (Fld1 c(5), Fld2 c(5)) ALTER TABLE Tst1T1 ALTER Fld1 c(5) Primary Key  Open the table Tst1T1 and modify it. Select the Indexes tab in the Table Designer and verify that a Primary Index has been created on the first field, Fld1. Close the Table Designer and leave the table open in the current work area. Create another database Test2 using "CREATE DATABASE Test2" command.  Issue the following commands to copy Tst1T1 table from Test1 database to Test2 as Tst2T1: SET DATABASE TO Test2 SELECT Tst1T1 COPY TO Tst2T1 PRODUCTION DATABASE Test2  When you get the "Invalid File Descriptor" error, click OK. After the table Tst1T1 is copied to Test2 database as Tst2T1, open and then modify the Tst2T1 table in the Test2 database. When in the Table Designer, select the Indexes tab. Notice that the Index type has changed from Primary to Candidate.</li></ol>

Additional query words: kbvfp600fix

Keywords: kbbug kbfix KB157253

-

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

© Microsoft Corporation. All rights reserved.