Sets the SQL statement for a command. This method is for use with ASP targets only.
PSCommandClass objects
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 |
Boolean. Returns true if it succeeds and false if it fails.
At runtime, SetSQL uses services provided by the Web Target object model rather than native services of the application server.
The following example sets the SQL statement for a PSCommandClass object and then executes the SQL:
mycommand.SetSQL("SELECT * FROM products");
mycommand.Execute();