SAMPLE: ADO2VJ6 Demonstrates Using the ADO 2.0 dll Directly

ID: Q195016

The information in this article applies to:

SUMMARY

Ado2vj6.exe is a sample that demonstrates using COM/ADO with Visual J++ 6.0.

With Visual J++ 6.0, ActiveX Data Objects (ADO) can be accessed directly (by creating a COM wrapper around the Msado15.dll) or through the Windows Foundation Classes (WFC) wrapper class com.ms.wfc.data. The WFC/ADO approach is easier to use because the method arguments usually take native Java types. The COM/ADO approach requires VARIANT arguments for a number of methods. While the WFC/ADO approach is simpler, it does have two drawbacks:

This sample is the ADO/COM version of the sample WFCado (which takes the WFC/ADO approach). You can compare the two samples to see the complexity of using safe arrays in ADO/COM versus passing native values in the WFC/ADO approach.

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ Ado2vj6.exe (size: 42878 bytes) 

Release Date: NOV-02-1998

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE : How to Obtain Microsoft Support Files from Online Services

   FileName               Size
   ---------------------------------------------------------

   Codebase.dat              1
   Form1.class               2
   RS1.sln                   1
   RS1.suo                   5
   RS1.vjp                   5
   Student.mdb             116
   ADO2VJ6.class             9
   ADO2VJ6.java              9

To build this file, you will need to build a COM wrapper around ADO 2.0. You can build a COM wrapper by going to the Project menu and selecting "Add COM Wrapper ...". In the "COM Wrappers" dialog box, select the check box "Microsoft ActiveX Data Access 2.0 Library" and click OK.

To run this sample, you must have ADO 2.0 installed. You can get ADO from the Microsoft Data Access Software Development Kit (SDK) and the Microsoft Data Access Components Version 2.0 from the following Web site:

   http://www.microsoft.com/data/mdac2.htm

REFERENCES

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

   ARTICLE-ID: Q194813
   TITLE     : SAMPLE: WFCADO Demonstrates Using WFC ADO with Visual J++
               6.0

(c) Microsoft Corporation 1998. All Rights Reserved. Contributions by Rick Anderson, Microsoft Corporation.

Additional query words:

Keywords          : kbfile kbsample kbVJ600 
Version           : WINDOWS:6.0

Last Reviewed: December 4, 1998