%SSC_CLOSE

Hard close one or more open cursors

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
value = %SSC_CLOSE(dbchannel, cursor[, ...])

value

This function returns SSQL_NORMAL (success). (i)

dbchannel

An internal database channel previously initialized using %SSC_INIT and connected by %SSC_CONNECT. (n)

cursor

The ID number(s) of one or more database or statement cursors (opened with %SSC_OPEN). Cursor must be in the range 1 through the number specified by maxcur when the database channel was initialized (with %SSC_INIT). (n)

%SSC_CLOSE hard closes one or more cursors opened with %SSC_OPEN. For a database cursor, a hard close closes the cursor on the target database. (For information on soft closes, see Using cursors with SQL Connection and %SSC_SCLOSE.)

Once you close a cursor, that cursor is no longer valid. (Note that if cursor is not an open cursor, you will get a return value of SSQL_NORMAL, not SSQL_FAILURE.)

The cursor argument is cleared to 0 when a cursor is hard closed.

Note

A commit or rollback transaction may or may not close open cursors automatically. You should always explicitly close cursors before a commit or rollback.

A table can be dropped (that is, deleted or removed) only if all cursors are hard closed.

If you use ^VARARGARRAY, note that cursor is the last declared argument for this routine.

For an example that uses %SSC_CLOSE, see %SSC_COMMIT.