Select the product you need help with
SAMPLE: DB2XML Implements Pluggable Protocol HandlerArticle ID: 260528 This article was previously published under Q260528 On This PageSummary
DB2XML is a sample pluggable protocol handler for Internet Explorer. It provides a protocol-based mechanism for extracting XML data from a database table through the use of an SQL-style query.
More informationThe following file is available for download from the Microsoft Download Center: DB2XML.exe
Release Date: Feb-01-2001
(http://download.microsoft.com/download/ie55/sample1/1.1/WIN98/EN-US/DB2XML.exe)
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
To use the DB2XML protocol, simply use a URL of the following format anywhere that a URL is used to return XML data:
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
You can use the HTML file Prottest-urllist.htm, which is included with the project, to view an actual example of the proper URL syntax for the urllist CSV text file database, as described later in this article. Building the ProjectThe current Platform SDK headers and libraries are required to build this sample in Visual C++ 6.0. You must ensure that the Platform SDK include and libraries folder have been added to the default include and libraries directory lists in Microsoft Visual C++. To do so, you can choose Options from the Tools menu, and then click the Directories tab.Because of incompatibilities in the Active Template Library (ATL) that were included in Visual C++ 6.0 with the new Platform SDK headers, the new Platform SDK "ATL30" subfolder must be first in the list. After a successful build in Visual C++, the protocol will be self-registered and ready to use. Simple TestTo test the pluggable protocol portion of DB2XML without connecting to a database, you can type the following URL into Internet Explorer's address bar:x-db2xml://*test*
This outputs simple XML test data from the protocol handler.To exercise the full use of DB2XML and retrieve data from a database, Windows 2000, or MDAC 2.5 or later is required on the client computer. Also, a .udl file must be set up for access to a database. Installing MDACMake sure that the latest Microsoft Data Access Components (MDAC) components have been installed on all client computers. These can be downloaded from the following Microsoft Web site:Microsoft Universal Data Access (MDAC) Web page
This sample was tested against MDAC 2.5.
(http://msdn.microsoft.com/en-us/data/aa937730.aspx)
Setting Up the .udl FileThe DB2XML protocol requires a Microsoft Data Link File (.udl extension) to specify the connection string for a database. For full instructions and documentation on Data Link Files and the OLE DB Data Link technology, see the "References" section of this article.DB2XML provides a simple CSV text file that is named "URLlist.txt" and an associated URLlist.udl file, which you can use to test the protocol through the ODBC text driver. Simply correct the path to the Initial Catalog in the UDL file to the directory where URList.txt currently resides. For example, URLlist.udl: References
For directions on creating a .udl file, refer to the Data Link API overview in the MDAC 2.5 - OLE DB Programmer's Reference. In the MSDN documentation, this article is currently located at:
Platform SDK: Data Access Services, Microsoft OLE DB, OLE DB Programmer's Reference, Part 2 OLE DB Core, Chapter 20: OLE DB Core Components, Connection Strings and Data Links, Data Link API Overview
The OLE DB templates that are provided with Visual C++ 6 are currently documented at:
Visual Studio 6.0 Documentation: Visual C++ Documentation, Reference, Microsoft Foundation Class Library and Templates, OLE DB Templates
PropertiesArticle ID: 260528 - Last Review: May 22, 2013 - Revision: 6.0
|



Back to the top








