Previous in Contents Next in Contents

The Content Object

Note  The Content object is included in Commerce Server 3.0 only for backward compatibility with sites created in Commerce Server 2.0. New sites should be constructed using Microsoft® ActiveX® Data Objects (ADO). Connection strings (not data source names (DSNs)) should be stored in the ConnectionStringMap (part of the site dictionary) and queries should be stored in the QueryMap Dictionary object.

The Content object provides a way for Commerce Server 2.0 sites to create and maintain a group of variables that identify the queries and DSNs needed to interact with a site's inventory. You can use Content object methods to associate string variables with configured system and file DSNs, to associate SQL query strings with Application-wide variables, and to create the Datasource objects through which these queries are executed.

The Content object supports the following methods.

Method Description
AddDatasource Associates a string variable with a configured system or file DSN and stores this variable in the Content object cache.
AddQuery Associates a string variable with an SQL statement, and stores this variable in the Content object cache.
Datasource Returns a Datasource object based on the variable name associated with a DSN variable. The Datasource method is the default method for the Content object.


© 1997-2000 Microsoft Corporation. All rights reserved.