The client application can create a stored procedure within ASE that invokes the access server library transfer function. The access service library receives the transfer command as an RPC event with these arguments:
Name of the RPC: “transfer”
Argument 1: The secondary connection information ({to | from} “server userid pw”)
Argument 2: Either the bulk copy target command or the destination-template sourceselectstatement.
Argument 3: Either the bulk copy sourceselectstatement or the destination-template sourceselectstatement.
This example shows a stored procedure that initiates a bulk copy transfer statement:
create procedure replauth as begin execute servername. . .transfer “to ‘servername2 userid password’;”, “with replace into authors;”, “select * from authors;” end
where:
replauth is the name of the stored procedure.
servername specifies the access service to handle the transfer. The three periods following servername are required.
The access service library recognizes anything other than “transfer” in the next position as the name of an ODBC stored procedure.
servername2 specifies the secondary database for the transfer command.
The RPC can have any number of parameters, because the RPC or parameters are concatenated and executed as a transfer command.
A client can log in to the ASE on which this procedure is defined and invoke it as follows:
execute replauth
When ASE executes replauth, it passes an RPC to the access service. The access service returns any result rows or messages to the client application, not to ASE.