Microsoft .NET sample client

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:

Prerequisites for sample client

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

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.

Syntax

Execute.exe “web_service_URLaseServerName user_ID passwordSQLX_optionoutput_classselect_statement

Parameters

Example1

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.

Example 2

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.