Transact
Transact_Fetch
(SWI &4FC07)
Retrieves the whole or a part of a result set (previously built with a Transact_Select
) to a client application.
On entry
- R0 = External session ID as returned by
Transact_CreateSession
;
- R1 = Cursor ID as returned by
Transact_Select
;
- R2 = Pointer where the engine should store the data (RMA or application workspace);
- R3 = Start of involved zone (offset of the first byte from the beginning of the result set);
- R4 = End of involved zone (offset of the last byte from the beginning of the result set + 1).
On exit
- R1 = Number of bytes successfully copied;
- All other registers are preserved.
Possible errors
- &812B00 Busy (not yet implemented in this release)
- &812B01 Unknown session
- &812B02 Unknown object
- &812B05 Invalid parameters
- &812B04 Not enough memory to service this request
- &812B03 Unknown cursor
- &812B09 No previous
SELECT
for this cursor
- &812B06 Invalid operation for this cursor mode (
FORWARD_ONLY
)
Additional notes
- A call to the SWI
Transact_Fetch
which fetch the last byte of a result set as the cursor mode is FORWARD_ONLY
do not trigger a reinit of the cursor (which would allow it to be the object of a subsequent Transact_Select
). A call to Transact_AllDone
still needs to be done. This may evolve in a future release of the Transact engine;
- The application should ensure that sufficient amount of memory is available to store the data from the result set (at least R4 - R3 bytes should be allocated).
If some data is missing from the result set, then no error occurs; the client application should check that the returned number of bytes = R4 - R3 upon entry.