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

  


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