Wednesday, September 29, 2004

ATLAgent: Demonstrates Using CCommand and CAccessor to Read Information from a Database with TTL Engines

ATLAgent: Demonstrates Using CCommand and CAccessor to Read Information from a Database: "MSDN Home > MSDN Library >
ATLAgent: Demonstrates Using CCommand and CAccessor to Read Information from a Database
This control reads instructions from a database using the OLE DB Consumer Template classes. These instructions are used to command the Microsoft Agent control. The sample demonstrates how to use the CCommand and CAccessor classes to read information from a database and how to use the compiler COM support to control the Microsoft Agent.
To install the Microsoft Agent control
Download the Microsoft Agent control from http://www.microsoft.com/workshop/prog/agent. Select Downloads from the left pane.


Optionally, download the text-to-speech engine available from the same page to allow the agent to speak.


Choose the link to download the Microsoft Agent character animation files and download one or more of the character .acs files. By default the ATLAgent control uses the Merlin-with-sound-effects character (merlinsfx.acs). Save the files to the directory where you have installed Microsoft Agent typically, C:\Program Files\Microsoft Agent\.
To use the control
Select the ODBC icon in Control Panel and set up a Microsoft Access data source called Agent. Point the data source to the Agent.mdb file contained in the samples directory.


Modify the directory locations at the beginning of AgentCtl.h if you have installed Microsoft Agent into a different directory.


Build the control.


Open ATLAgent.htm from the sample and click the Play button. The Agent should appear and should follow the instructions contained in the Instructions table in the Agent.mdb database."

No comments: