23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Syntax<br />

Example<br />

Authorization<br />

None<br />

Related statements<br />

CLOSE<br />

Static Array Types<br />

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

EXEC <strong>SQL</strong> CLOSE cursor_name ;<br />

cursor_name<br />

E<strong>SQL</strong> elements and statements<br />

An identifier named earlier in a DECLARE CURSOR statement and an OPEN CURSOR statement.<br />

EXEC <strong>SQL</strong> CLOSE dyncur ;<br />

EXEC <strong>SQL</strong> COMMIT WORK ;<br />

Notes • Only a cursor in the open state can be set to the closed state.<br />

• When a transaction ends, any cursors in the open state are automatically set to the closed<br />

state.<br />

• When a cursor is in the closed state, you cannot perform FETCH, DELETE, or UPDATE<br />

operations using that cursor.<br />

• It is good practice to close cursors explicitly.<br />

Authorization<br />

None<br />

Related statements<br />

DELETE, OPEN, FETCH, positioned UPDATE, positioned DELETE<br />

CONNECT<br />

Establishes a connection to a database. Optionally, the CONNECT statement can also specify a<br />

name for the connection and a username and password for authentication.<br />

321

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!