PSCommandClass

Provides a mechanism for storing and re-executing a SQL statement.

For JSP targets you must assign a variable of the PSCommandClass type before you can create an instance of the object or call methods on it. To create an object of type PSCommandClass in ASP targets, you can designate an untyped variable to reference an instance of the object that is returned by the CreateCommand method on a PSConnectionClass object.

Syntax

JSP targets

PSCommandClass ( strSql, conn) 

ASP targets

PSCommandClass ( ADOCom ) 

Constructors

PSCommandClass constructor

Datatype

Description

strSql

String

SQL statement you want to execute

conn

PSConnectionClass

Object you use to connect to the database where you want to execute the SQL statement

ADOCom

ADODB.command object (returned by the PSConnectionClass CreateCommand method)

Object you use to connect to the database where you want to execute the SQL statement

Methods

PSCommandClass method

Description

Execute

Executes a SQL command

SetSQL

Sets the SQL statement for a command (ASP targets)