Description of RPCs  Executing a language statement as an RPC

Chapter 7: Issuing RPC Events

Creating and executing Adaptive Server stored procedures

Use the following example to create an Adaptive Server stored procedure that executes an RSP. The new procedure must specify an existing RSP and provide any arguments that the RSP requires.

create procedure newcust @custname varchar(nn),
 @custno varchar (nn) as
 begin
 execute servername. . .addcust
 @addname=custname, @addno=custno
end

where:

To execute the stored procedure in the preceding example using isql, perform the following steps:

  1. Connect to Adaptive Server.

  2. At the prompt, enter the following:

    c:>ISQL -Ssybase -Uuser -Ppasswrd
     1> execute newcust xxxx,yyyy
    2> go
    

    where:

The results obtained depend on the defined addcust stored procedure.





Copyright © 2005. Sybase Inc. All rights reserved. Executing a language statement as an RPC

View this book as PDF