HOWTO: ADC: How To Use From Inside a Visual Basic ProgramLast reviewed: September 30, 1997Article ID: Q165297 |
The information in this article applies to:
SUMMARYThe Microsoft Advanced Data Connector (ADC) can be used inside a Visual Basic program as easily as it can be used from inside Internet Explorer (IE) 3.0. You are not able to bind controls to it with the AdvancedDataControl as you can in IE, but you can use the AdvancedDataSpace and the AdvancedDataFactory objects to return a recordset to your Visual Basic program with a small amount of code. With this returned recordset you can populate non-bound controls as you would in a normal program. Since the ADC only allows native update capability with the Microsoft SQL Server ODBC driver, you can use the information in this article to update non-SQL server ODBC databases very easily.
MORE INFORMATION
Sample ProgramThis example uses the ADC CreateObject method of the AdvancedDataSpace on the client to instantiate the AdvancedDataFactory object on a remote server over http. The AdvancedDataFactory object then uses the Query method to execute SQL on the remote server and return an ADO/R recordset to the client. In order to run the example code you first need to install the ADC client components by using a CODEBASE parameter in an OBJECT tag of an HTML page. To do this go to the sample page on your ADC Server at http://[SERVER]/Msadc/Samples/Adctest.asp and these components are automatically be installed on the client. This sample uses SQL Server and the Pubs database, but you can change the System DSN, UID, PWD, and SQL to match any ODBC database you may be using.
REFERENCESWeb site for ADC, http://www.microsoft.com/adc ADC public newsgroup, microsoft.public.adc Readme file, file://\\[SERVER DIR]\msadc\Doc\readme.txt ADC Help, file://\\[SERVER DIR]\msadc\Doc\madc10.hlp Keywords : kbprg iisapi kbhowto Version : 3.0 Platform : NT WINDOWS Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |