Release 10.1A: OpenEdge Data Management:
SQL Reference

> ## CLOSE

> Closing a cursor changes the state of the cursor from open to closed.

> #### Syntax

>     EXEC SQL CLOSE cursor_name ;

> `cursor_name`

> An identifier named earlier in a `DECLARE` `CURSOR` statement and an `OPEN` `CURSOR` statement.

> Example

>     EXEC SQL CLOSE dyncur ;
>     EXEC SQL COMMIT WORK ;

> #### Notes

> - Only a cursor in the open state can be set to the closed state.

> - When a transaction ends, any cursors in the open state are automatically set to the closed state.

> - When a cursor is in the closed state, you cannot perform `FETCH`, `DELETE`, or `UPDATE` operations using that cursor.

> - It is good practice to close cursors explicitly.

> ##### Authorization

> None

> ##### Related statements

> DELETE, OPEN, FETCH, positioned UPDATE, positioned DELETE

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095