The information in this article applies to:
SYMPTOMSThe Delete method incorrectly reports the following message for the existing member under certain conditions: This occurs when you use the OpenDatabase function to open a database, and then immediately, as the first change to the database's structure, execute a Delete method on a member of a TableDefs or Indexes collection. The member can be a TableDef or Index. CAUSEThe problem occurs when a Delete method is the first data definition language (DDL) operation after you open the database. WORKAROUND
To work around the bug, use the Refresh method on the Indexes collection
before using the Delete method. An example is shown in "Workaround Example"
under the More Information section below. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0. MORE INFORMATIONSteps to Reproduce Problem
Workaround ExampleTo work around this bug, use the Refresh method before using the Delete method:
As an alternative workaround, replace the Delete line with this command:
This command expands "PubID" into its complete reference:
This refreshes the Indexes collection before PubID is deleted in the same
statement.NOTE: If you run the program twice using the workaround, the program correctly gives the error, "Name not found in this collection." The error is correct this time because the PubID index member was successfully deleted and no longer exists. Additional query words: buglist3.00 3.00 fixlist4.00
Keywords : |
Last Reviewed: September 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |