Skip to Main Content Skip to Search
Product Documentation

close - Close database connection, cursor, or resultset object

Syntax

close(object)

Description

close(object) closes object, which frees up resources.

Allowable objects for close are listed in the following table.

ObjectDescriptionAction Performed by close(object)

conn

Database connection object

Closes conn

curs

Cursor object

Closes curs

rset

Resultset object

Closes rset

Database connections, cursors, and resultsets remain open until you close them using the close function. Always close a cursor, connection, or resultset when you finish using it. Close a cursor before closing the connection used for that cursor.

Examples

Close the cursor curs and the connection conn.

close(curs)
close(conn)

See Also

cursor.fetch | database | exec | resultset

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS