Export (0) Print
Expand All

ATLRT Sample: Demonstrates Custom SRF Tags 

Download sample

Demonstrates extending ATL Server's stencil-parsing code to support custom tags. The custom tags supplied in this sample provide support for variables and generic database access from within a SRF file.

ATLRT is an ATL Server request handler that exposes a set of custom tags that can be used to build ATL Server applications. This sample illustrates database access using OLE DB consumer templates as well as how ATL Server tags can be used to create a virtual scripting language.

The tags used in this sample are described in ATLRT Tag Reference.

Security noteSecurity Note

This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended.

Requirements

  • SQL Server

  • IIS

Building and Running the Sample

To build and run this sample

  1. Ensure that you have a SQL Server database containing a stored procedure that returns a few results. If necessary, use the pubs database sample distributed with SQL Server and execute the SQL script in atlrt.sql to add a stored procedure to return all of the authors.

  2. Edit atlrt.srf and change the values in the {{SetConnection}} and {{Execute}} tags to provide the connection string to your database and the name of a stored procedure.

  3. Open the solution file, AtlRt.sln, in the Visual Studio development environment.

  4. Build the solution. This will also deploy the solution to the local Web server.

  5. Use a Web browser to view http://localhost/atlrt/atlrt.srf.

See Also

Other Resources

ATL Server Samples

Community Additions

ADD
Show:
© 2014 Microsoft