Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

SQL Reference

Commands

Syntax

Options

Example

 

SQL Reference

Joins

Nested Queries

Set Operations

ON CURSOR | INSTANCE

WITH Options

Commands

Functions

 

CLOSE CURSOR

Closes a cursor. This statement is used in ODXSQL and can be passed in OmniAccess API applications through oaexecsql, as an alternative to oaclosecursor.

This command is not relevant to ODBC and JDBC applications because each Statement object is opened and closed on its own cursor, although it is technically supported.

Each time CLOSE CURSOR is called, the cursor parameter of the status array is emptied, no matter which cursor was closed. That means that there is no default cursor defined and unless reset, subsequent calls must explicitly state which cursor to perform an action on.

See Also: OPEN CURSOR

 

Syntax

CLOSE CURSOR [[ON] CURSOR] cursornumber] [WITH options]

CLOSE CURSOR
Required.

[ON] CURSOR cursornumber
Both the ON and CURSOR keywords are optional. cursornumber is the integer cursor number assigned when the cursor was opened. If omitted, the current cursor defined in the status array is closed.

[WITH options]
Optional - Specify options to be used for this command.

 

Options

There are currently no options available for use with the CLOSE CURSOR command. Support was added for future enhancements.

 

Example

Open a connection to the environment file causing cursor1 to automatically open.

>CONNECT ORDERS.ENV

Open cursor2. Cursor2 is now the current cursor in the status array.

>OPEN CURSOR

There are now 2 cursors available for use in the application.

>CLOSE CURSOR 1

>CLOSE CURSOR ON CURSOR 2

 

Top