Article ID: 195016
Article Last Modified on 8/9/2004
APPLIES TO
- Microsoft Visual J++ 6.0 Standard Edition
- Microsoft ActiveX Data Objects 2.1 Service Pack 2
This article was previously published under Q195016
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:
- Not all ADO methods and properties are available. Method
names are also different (for example, MoveNext is lower-case "moveNext").
- The documented constants have new names. This problem can
be resolved by including the class adoCon.java from the sample referred to in
the following article in the Microsoft Knowledge Base:
194813 SAMPLE: WFCADO Demonstrates Using WFC ADO with Visual J++ 6.0
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.
REFERENCES
For additional information, please see the following
article(s) in the Microsoft Knowledge Base:
194813 SAMPLE: WFCADO Demonstrates Using WFC ADO with Visual J++ 6.0
(c) Microsoft Corporation 1998. All Rights Reserved.
Contributions by Rick Anderson, Microsoft Corporation.
Keywords: kbinfo kbdatabase kbfile kbsample KB195016