SetSQL

Description

Sets the SQL statement for a command. This method is for use with ASP targets only.

Applies to

PSCommandClass objects

Syntax

commandobject.SetSQL( SQLstring )

Argument

Description

commandobject

A variable that contains a reference to an instance of PSCommandClass

SQLstring

A string that specifies the SQL statement

Returns

Boolean. Returns true if it succeeds and false if it fails.

Usage

At runtime, SetSQL uses services provided by the Web Target object model rather than native services of the application server.

Examples

Example 1

The following example sets the SQL statement for a PSCommandClass object and then executes the SQL:

mycommand.SetSQL("SELECT * FROM products");
mycommand.Execute();