Microsoft KB Archive/114679

= ADT2: Three Methods to Test Visual Basic Compatibility Layer =

Article ID: 114679

Article Last Modified on 7/8/2002

-

APPLIES TO


 * Microsoft Access Developer's Toolkit 2.0

-



This article was previously published under Q114679



Moderate: Requires basic macro, coding, and interoperability skills.



SUMMARY
Once you have installed the Visual Basic Compatibility Layer (VBCL), there are several test methods you can use in Visual Basic version 3.0 to verify that it is working correctly:


 * The Data Manager window. (This is the simplest method.)
 * The Data Access control.
 * The Visual Data (VisData) sample application (Visual Basic Professional Edition only).



Using The Data Manager Window
To use the Data Manager window, follow these steps:
 * 1) Start Visual Basic and choose Data Manager from the Window menu.
 * 2) From the File menu, choose Open Database, and then choose Microsoft Access.
 * 3) Select the sample database NWIND.MDB, and then choose OK.

If the VBCL is installed correctly, you will see a list of all the tables in NWIND.MDB. If the VBCL is not installed, or if it is not installed correctly, you will receive the error message

Incompatible database version.

Using the Data Access Control
To use the Data Access control, follow these steps:

 Start Visual Basic and add a data access control and a text box control to a new form.  Set the following properties for the data access control:      DatabaseName: C:\ACCESS\SAMPAPPS\NWIND.MDB RecordSource: Employees   Set the following properties for the text box control:      DataSource: Data1 DataField: Last Name  From the Run menu, choose Start.

If the VBCL is installed correctly, you will see the name "Davolio" in the text box. Also, you will be able to step back and forth through the names using the arrows on either side of the data access control.

If the VBCL is not installed, or if it is not installed correctly, you will receive the error message "Incompatible database version."

Using the Visual Data (VisData) Sample Application
To use the Visual Data (VisData) sample application, follow these steps:


 * 1) Start Visual Basic and open the VISDATA.MAK file in the SAMPLES\VISDATA subdirectory.
 * 2) From the Run menu, choose Start.
 * 3) From the File menu, choose Open Database, and then choose Microsoft Access.
 * 4) Select NWIND.MDB.

If the VBCL is installed correctly, you will see a list of tables and queries from the NWIND database. Otherwise, you will receive the error message:

Incompatible database version Number: 3041

To test the VBCL further, enter the following statement in the SQL window:

SELECT * FROM Employees

If the VBCL is installed correctly, you will see a window titled "Dynaset: Employees" with the first employee's data showing.

Additional query words: attaching testing

Keywords: kbinfo kbinterop KB114679

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.