Microsoft KB Archive/169807: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 30: | Line 30: | ||
# Make sure you have registered ADO; see '''http://www.microsoft.com/oledb/download/download.htm#Update''' for more information. | # Make sure you have registered ADO; see '''http://www.microsoft.com/oledb/download/download.htm#Update''' for more information. | ||
# Run | # Run "JAVATLB.EXE /U:T msado10.dll" from the Program Files\Common Files\System\ADO folder. | ||
The following code calls the ADO getConnectionTimeout() function: | The following code calls the ADO getConnectionTimeout() function: | ||
Line 44: | Line 44: | ||
MyADOConnection = (_Connection) mgr.createWithLic( | MyADOConnection = (_Connection) mgr.createWithLic( | ||
// The license key for ADO | // The license key for ADO | ||
"gxwaezucfyqpwjgqbcmtsncuhwsnyhiohwxz", | |||
// The CLSID for ADO Connection | // The CLSID for ADO Connection | ||
"{00000293-0000-0010-8000-00AA006D2EA4}", | |||
// The aggregation IUnknown* punkOuter | // The aggregation IUnknown* punkOuter | ||
null, | null, | ||
Line 52: | Line 52: | ||
ComContext.INPROC_SERVER ); | ComContext.INPROC_SERVER ); | ||
int timeout = MyADOConnection.getConnectionTimeout(); | int timeout = MyADOConnection.getConnectionTimeout(); | ||
System.out.println( | System.out.println("getConnectionTimeout() returned "+timeout); | ||
} | } | ||
} | } | ||
Line 78: | Line 78: | ||
</span><br /> | </span><br /> | ||
<br /> | <br /> | ||
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED | 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.</blockquote> | ||
|} | |} | ||
Last reviewed: February 19, 1998<br /> | Last reviewed: February 19, 1998<br /> | ||
© 1998 Microsoft Corporation. All rights reserved. [[../cpyright|Terms of Use.]]<br /> | © 1998 Microsoft Corporation. All rights reserved. [[../cpyright|Terms of Use.]]<br /> |
Latest revision as of 11:04, 21 July 2020
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.