FIX: Name Not Found in This Collection When Deleting Member (107362)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q107362 SYMPTOMS
The Delete method incorrectly reports the following message for the
existing member under certain conditions:
Name not found in this collection. Error 3265.
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.
CAUSE
The 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.
NOTE: A program will correctly give the above error message when the name
truly is not found in the collection. As soon as a Delete method succeeds
on a specified TableDef or Index member of a collection, that name will no
longer be found in the collection.
STATUS
Microsoft 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.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | kbbug KB107362 |
---|
|