dbCloseRecordset()

Database function for closing a tabular data subset of a data source.

Synopsis

int dbCloseRecordset(dbRecordset recordset);

Parameters

Parameter Meaning
recordset Record set reference

Return Value

The return value is an error code; 0 indicates the operation has been performed successfully. For other values dbGetError() can be used to obtain detailed error information.

Errors

An error is returned if an invalid record set reference variable is passed, or if changes to the record set are still waiting to be made.

Description

Record sets opened successfully with dbOpenRecordset must be released again with dbCloseRecordset. Record sets released by dbCloseRecordset() are subsequently invalid and must no longer be passed to other ADO functions (apart from dbOpenRecordset()).

If changes to the record set (fields changed with dbPutField() or an empty data record created with dbAddNew()) are still waiting to be completed (with dbUpdate()), dbCloseRecordset() returns an error.

Example

see dbOpenRecordset()

Assignment

ADO and Qt, Database functions

Availability

CTRL