execute

The execute method executes a Transact-SQL statement or stored procedure in Adaptive Server Enterprise.

Syntax

execute aseServerName userName password  sqlxOptions sql

Parameters

Example 1

This example checks the version number for Adaptive Server Enterprise.

execute johndoe-sun sa password "tablename=ws" "select @@version"

This example invokes the Web method directly. ASE Web Services returns an XML schema, a DTD, and a result set containing the result of the executed statement.

Example 2

This example computes a left join on tables in the pubs2 database.

execute johndoe-sun sa password "tablename=ws" 
"select title, price, au_fname, au_lname from (titles
left join titleauthor on titles.title_id =
titleauthor.title_id ) left join authors on
titleauthor.au_id = authors.au_id and titles.price >
$15.00”