PRB: OpenTable in VB ODBC App Error: Can't Perform Operation

Last reviewed: June 21, 1995
Article ID: Q101254
The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows, version 3.0

SYMPTOMS

The OpenTable method is not supported in Visual Basic version 3.0 for ODBC data sources. If you attempt to use it in an application that uses ODBC data sources, you will see this error message:

   Can't perform operation; it is illegal.

CAUSE

Visual Basic version 3.0 introduced a new layer of database management, the Microsoft Access engine, that lies between Visual Basic itself and the ODBC drivers. This new layer allows version 3.0 to work with Microsoft Access, FoxPro, Paradox, and dBASE databases. However, the Microsoft Access engine does not support using OpenTable on ODBC data sources, or any table that is not part of a Microsoft Access database (.MDB). Therefore, when you attempt to use OpenTable on tables that are not Microsoft Access tables or that come from on an ODBC data source, Visual Basic version 3.0 generates the error.

WORKAROUND

You can use CreateDynaset on any table that uses an ISAM or ODBC (attached tables).

STATUS

This behavior is by design. It is documented on page 149 of the Visual Basic version 3.0 "Professional Features Book 2" manual.


Additional reference words: 3.00
KBCategory: kbinterop kbprg kbprb
KBSubcategory: APrgDataODBC


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.