FIX: Incorrect VB Error When Delete Index on Open Table (107363)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q107363 SYMPTOMS
If you attempt to delete an index on an open table, you correctly get an
error but the message is incorrect.
The program example given in the More Information section gives the
following incorrect error when attempting to delete an index from an
open Microsoft Access table:
ODBC-call failed.
This message is misleading because the program uses no ODBC. This is
error number 3146, returned by the Err function.
CAUSE
The ODBC-call failed message is incorrect. The message should instead
say the table is currently open and cannot be locked.
You cannot delete an index from a table if the table is Open. This is
behavior is by design. You must be able to lock the table before you can
delete an index. You cannot lock the table if the table is open by
anyone.
WORKAROUND
Close the table before deleting an index. You may also need to use
the Refresh method on the TableDefs collection before using the Delete
method.
STATUS
Regarding the incorrect error message, 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.
All other behavior described in this article is by design.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | kbbug KB107363 |
---|
|