Execute a SQL language statement to the access service through an RPC.
C:> isql -Sadaptiveserver -Uuser -Ppassword 1> execute directconnect. . .dcon “select * from user.authors” 2> go
The access service RPC event handler is sensitive to several RPC keywords, including the keyword dcon. An RPC can have many parameters. Before the resulting string is executed, all parameters are concatenated. The access service translates the first parameter into a dynamic SQL statement, submits it to the target database, and returns the result set to the client application.
The event sequence is:
If the site handler connection exists, then Adaptive Server connects to the remote server, triggering a connect event in the DirectConnect server.
If the connect event processes successfully, then Adaptive Server triggers an RPC event in the DirectConnect server and submits the RPC called dcon. The first parameter to the RPC is the dynamic SQL language statement that is executed.
If the site handler connection does not exist, then Adaptive Server establishes one.
This connection exists for the term of the RPC. It is reused if Adaptive Server submits other RPCs.