HOWTO: Passing a License Key to ADO from JavaLast reviewed: February 19, 1998 |
The information in this article applies to:
SUMMARYActiveX Data Objects (ADO) are freely redistributable; however, you do have to pass a license key when using ADO 1.0 in order to properly instantiate ADO. ADO/R, the Recordset-only version of ADO, does not require a license key. MORE INFORMATIONThe following program shows how to pass the license key to the first object you create with ADO. Before compiling and running this program, perform the following steps:
The following code calls the ADO getConnectionTimeout() function: // Sample program to call the ADO getConnectionTimeout() function. import msado10.*; import com.ms.com.*; public class ADOTest { public static void main(String args[]) { // Create the License Manager object _Connection MyADOConnection=null; ILicenseMgr mgr = new LicenseMgr(); MyADOConnection = (_Connection) mgr.createWithLic( // The license key for ADO "gxwaezucfyqpwjgqbcmtsncuhwsnyhiohwxz", // The CLSID for ADO Connection "{00000293-0000-0010-8000-00AA006D2EA4}", // The aggregation IUnknown* punkOuter null, // The ctxFlag to create in inproc server ComContext.INPROC_SERVER ); int timeout = MyADOConnection.getConnectionTimeout(); System.out.println("getConnectionTimeout() returned "+timeout); } } REFERENCESFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site: http://support.microsoft.com/support/visualj/ http://support.microsoft.com/support/java/ Keywords : kbcode adoengdb adovj JVM Technology : kbInetDev Platform : WINDOWS Issue type : kbhowto |
================================================================================ |
Last reviewed: February 19, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.