Partager via


CRecordset::OnSetOptions

Called to set options (used on selection) for the specified ODBC statement.

virtual void OnSetOptions( 
   HSTMT hstmt  
);

Parameters

  • hstmt
    The HSTMT of the ODBC statement whose options are to be set.

Remarks

Call OnSetOptions to set options (used on selection) for the specified ODBC statement. The framework calls this member function to set initial options for the recordset. OnSetOptions determines the data source's support for scrollable cursors and for cursor concurrency and sets the recordset's options accordingly. (Whereas OnSetOptions is used for selection operations, OnSetUpdateOptions is used for update operations.)

Override OnSetOptions to set options specific to the driver or the data source. For example, if your data source supports opening for exclusive access, you might override OnSetOptions to take advantage of that ability.

For more information about cursors, see the article ODBC.

Requirements

Header: afxdb.h

See Also

Reference

CRecordset Class

Hierarchy Chart

CDatabase::OnSetOptions

CRecordset::OnSetUpdateOptions