Sends the contents of the request buffer (for example, a TRANSFER statement, a SQL statement, or any other valid request) to run against the target database.
Syntax varies with the programming language.
command uses values from these SPAREA fields:
SET ADDRESS OF SQL-BUFFER TO SQL-RPT-PTR. SET SPSQL TO SQL-RPT-PTR. CALL 'REQEXEC' USING SPAREA.
When the CSA issues the REQEXEC command, Open ClientConnect places result information in the SPSTATUS field. The CSA can examine this field to determine if more results are available. The possible SPSTATUS values are:
‘OK’ indicates success.
‘E’ indicates an error.
‘W’ indicates a warning.
‘R’ indicates a result is available.
[Blank] indicates a result is not available.
The first 2 bytes (half-word) of the SQL request buffer must specify the total length of the buffer. If the buffer contains multiple SQL statements, the statements must be delimited by a semicolon (;).
The maximum size for the SQL statements is 32KB.
The CLIENTC2 sample program uses the REQEXEC command. The following example is excerpted from CLIENTC2’s paragraph 55500-SEND-REQUEST.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |