WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:sqlProc
Description:The active:sqlProc service issues a remote procedure call to a relational database server.
Id:mod-db:sqlProc
Category:accessor
Identifier Syntax

sqlProc is an accessor using Active URI syntax with the following base identifiers:

Base
active:sqlProc

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
operand
Mandatory
Representation (java.lang.Object)SQL remote procedure statement to be executed
configuration
Optional
Representation (java.lang.Object)Connection pool configuration
varargs [varargs] Any quantityRepresentation (java.lang.Object)Varargs allows an arbitrary number of additional unspecified arguments.
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use sqlProc accessor you must import the module urn:org:netkernel:mod:db:

<import>
  <uri>urn:org:netkernel:mod:db</uri>
</import>

When a request with the SOURCE verb is issued to active:sqlProc the SQL procedure call statement in the required operand argument is used with the database connection pool specified in the optional configuration argument. (If the configuration argument is not supplied then the service issues a request for the resource res:/etc/ConfigRDBMS.xml in the current space.) By default, the response representation is returned as an HDS structure in which a resultset node contains a row node for each row returned by the query. (See the documentation for sqlQuery for details)

For example, the following SQL procedure call statement

{ call MyProc( 84744, "avon" ) }

will call a remote procedure name MyProc and pass two values as (positional) arguments.

Example

The following code implements the example query illustrated above.

request = context.createRequest("active:sqlProc");
request.addArgumentByValue("operand", "{ call MyProc ( 8744, 'avon') }");
hds = context.issueRequest(request);