Knowledge Base

BUG: ALTER TABLE Cannot Create a Descending Primary Key

Article ID: 186242

Article Last Modified on 5/12/2003


APPLIES TO


This article was previously published under Q186242

SYMPTOMS

The ALTER TABLE command cannot create a descending primary key index.

RESOLUTION

Use the Visual FoxPro interface to visually create a primary descending index key.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a program that contains the following code and run the program:
          USE home()+"samples\data\customer"
          MODIFY  STRUCTURE
          INDEX ON cust_id TAG cust_id DESCENDING
          MODIFY STRUCTURE
          ALTER TABLE customer ADD PRIMARY KEY cust_id TAG cust_id
          MODIFY  STRUCTURE
  2. When the first Table Designer window appears, click the Indexes tab and note both the Order and Type for the Cust_id tag. The Indexes tab name is Index in Visual FoxPro 3.0. Click OK.
  3. Overwrite the Cust_id key when the warning message appears. Click the Indexes tab on the Table Designer window, noting that the Cust_id key is now a regular index type in descending order. Click OK.
  4. Overwrite the Cust_id key again when prompted. Click the Indexes tab of the Table Designer window. The Cust_id key is now a primary index key, but it is in ascending order.

Additional query words: kbDSupport KBDSE kbVFp500 kbVFp300bug kbVFp500abug kbVFp300b kbvfp600

Keywords: kbbug kbnofix KB186242