The
following file is available for download from the Microsoft Download
Center:
Release Date:
September 7, 2000
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 How to Obtain Microsoft Support Files from Online Services
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.
FileName | Size |
---|
ATL4Acc.cpp | 11 KB |
EULA.txt | 1.61 KB |
Readme.txt | 1 KB |
Steps to Run the Application
- Create an empty Win32 console application.
- Insert ATL4Acc.cpp into the project.
- Create a DSN, called LocalServer, that points to the SQL Server 7.0 pubs sample database using the
SQL Server ODBC driver.
- Create the stored procedure sp_Authors in the SQL Server pubs database using Query Analyzer. The stored
procedure code is given in the ATL4Acc.cpp file.
- Compile and run the application.
Data Retrieval for each Accessor
- The CAccessor class uses the Storage class CAuthors to create the accessor. It uses the BEGIN_COLUMN_MAP and
BEGIN_PARAM_MAP macros to build column and parameter accessors
respectively.
- The CManualAccessor class builds the parameters and data
column accessors dynamically. It makes use of SQL Server 7 database schema to
build its data column and parameter accessors and executes the query. It
retrieves data column information using the CColumns class that contains data
pertaining to the DBSCHEMA_COLUMNS schema. The parameter accessor is built
using the CProcedureParameters class that pertains to
DBSCHEMA_PROCEDURE_PARAMETERS schema.
- The CDynamicParameterAccessor class uses its
BindParameteres, SetData, and GetData member functions to build its parameter
accessor.
- The CDynamicAccessor class does not support parameterized
query.