Programming Guide



RELEASE

Release the cursor used to fetch data in the transaction manager

int sm_tm_command ("RELEASE [ tableViewName [ tableViewScope ] ]");

Description

RELEASE releases the database cursor used to fetch data in the transaction manager. In two-tier applications, if a continuation file is in use, that file will no longer be available. RELEASE is only used in special cases; generally, cursor management is part of the SELECT, VIEW and CONTINUE command.

For some database engines, such as SYBASE CT-Lib, the CLOSE command does not release the database locks when a SELECT command is not followed by a SAVE command. In this case, follow the CLOSE with the RELEASE command which gives up the locks on the database.

Sequence

RELEASE has no effect unless it is called after SELECT or VIEW.

Events

Table 8-26 Request events for RELEASE

Request Traversal Typical Processing

TM_PRE_RELEASE

By table/server view from the specified table view

Do nothing

TM_RELEASE

By table/server view from the specified table view

Slice: TM_GIVE_UP_SEL_CURSOR

TM_POST_RELEASE

By table/server view from the specified table view

Do nothing

Table 8-27 Slice event processing for RELEASE

Slices Typical Processing

TM_GIVE_UP_SEL_CURSOR

Give up the select cursor. If the cursor name is that of an existing cursor in the database interface, close that cursor (in which case the return value will be TM_CHECK).