This section describes the sample client and script found in the $SYBASE/WS-15_0/samples/ms.net directory in UNIX, or in the %SYBASE%\WS-15_0\samples\ms.net directory in Windows.
If you know just what you are looking for you may skip directly to it:
To use the sample client, you must first have the Microsoft .NET Framework installed. The framework is freely available from Microsoft for a variety of platforms. You may find the download for it at:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/netdevframework.asp
Once you have successfully downloaded and installed the .NET Framework, you are ready to run the sample application. This executable can be found in the ms.net directory. The entire Visual Studio solution used to create the sample is also provided.
Execute.exe executes a stored procedure or T-SQL statement on Adaptive Server Enterprise through Adaptive Server Enterprise Web Services. This sample application invokes the execute Web method.
Execute.exe “web_service_URL” aseServerName user_ID password “SQLX_option” output_class “select_statement”
The location of the Web service being used.
SOAP string indicating the name of the Adaptive Server Enterprise server in the sql.ini file or LDAP server.
The user ID needed to log in to the Adaptive Server Enterprise.
The password needed to log in to the Adaptive Server Enterprise.
String indicating one or more option parameters for a forxmlj function. These parameters specify characteristics of the SQLX result set. The following are valid option parameters:
You must provide values for value. For more information on SQLX functions and options, see XML Services in Adaptive Server Enterprise.
The kind of output desired. The following are valid values for this parameter:
The statement to be executed on Adaptive Server Enterprise. This statement must be delimited by double quotes.
This example checks the version number for Adaptive Server Enterprise.
Execute.exe "http://johndoe-sun:8183/services/ase" johndoe-sun sa nopasswordspecified "tablename=ws" all 1 "select @@version"
Adaptive Server Enterprise Web Services returns an XML schema, a DTD, and a result set containing the result of the executed statement.
This example executes a stored procedure called booksales on the pubs2 database. The stored procedure returns the number of copies sold for a specified book title ID.
Execute.exe "http://johndoe-sun:8183/services/ase" johndoe-sun sa nopasswordspecified "columnstyle=attribute,format=no,rowname=wsrow,prefix=Unnamedcol,nullstyle=attribute,header=yes" all 1 "execute booksales MC2222"
Adaptive Server Enterprise Web Services returns an XML schema, a DTD, and a result set containing the result of the executed statement.