CRecordset::Close

virtual void Close( );

Remarks

Call this member function to close the recordset. The ODBC HSTMT and all memory the framework allocated for the recordset are deallocated. Usually after calling Close, you delete the C++ recordset object if it was allocated with new.

You can call Open again after calling Close. This lets you reuse the recordset object. The alternative is to call Requery.

Example

// Example for CRecordset::Close

// Construct a snapshot object
CCustSet rsCustSet( NULL );

if( !rsCustSet.Open( ) )
   return FALSE;

// Use the snapshot ...

// Close the snapshot
rsCustSet.Close( );

// Destructor is called when the function exits

CRecordset OverviewClass MembersHierarchy Chart

See Also   CRecordset::CRecordset, CRecordset::Open, CRecordset::Requery