Platform SDK: Broadcast Architecture |
The OpenRecordset method opens the specified recordset in the Guide database. C syntax is shown.
BOOL OpenRecordset( LPCTSTR WhereBy, LONG lType );
Value | Meaning |
---|---|
dbOpenSnapshot | Open the recordset as a snapshot, in other words as a fixed copy of the records in the table. |
dbOpenDynaset | Open the recordset as a dynaset, in other words as a set of pointers to the records in the table. The dbOpenDynaset value is the default. |
Returns TRUE if the recordset was successfully opened, and FALSE otherwise.
You can reuse recordset objects by opening and closing a single recordset object multiple times. Doing so is more efficient than deleting and creating a new instance of a recordset object.
The record count within a recordset is not automatically defined when your application opens the recordset unless your application uses a SQL ORDER BY clause. If your application does not use ORDER BY, it can determine record count by calling theGetRecordCount method after calling OpenRecordset. However, GetRecordCount must move to the last record in the set. This movement can be slow for large recordsets. Use of the SQL ORDER BY clause sets the correct record count as part of the indexing process.
In the case of large recordsets, opening the recordset as a snapshot can degrade performance.
Windows NT/2000: Unsupported.
Windows 95/98: Requires Windows 98.
Header: Declared in dbsets.h.
Import Library: Use dbsets.lib or dbsetsst.lib.