Previous in Contents Next in Contents

Datasource.Execute Method

Note  The Datasource 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 ADOs.

The Execute method executes the specified query and returns the results of the query, if any, in a SimpleList object containing Dictionary objects.

Syntax

Datasource.Execute(SQL, Parameters)

Parameters

SQL
The string resource identifier of a query added to a Content object through a previous call to AddQuery, or the SQL text of the query.
Parameters
Optional. One or more parameters to bind to the parameter markers in SQL.

Remarks

You can pass the Execute method the text of a query, but this technique does not take advantage of the speed optimizations built into the Content object, and is not advised. If the SQL parameter to Execute is the text of a query, default values are used for the query's timeout, command type, maximum rows fetched, cursor type, and cursor size. The default value for each of these arguments is listed under AddQuery.

Related Topics


© 1997-2000 Microsoft Corporation. All rights reserved.