getRWStatus

Returns the read/write status of a specified column, row, cell, or data set. If one or both of iRow and iColumn have a value of -1, the read/write status is returned for the entire column, row, or complete data set.

Important

This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, write a fully functional OLE DB provider using the native OLE DB interfaces.

Syntax

HRESULT getRWStatus (
   DBROWCOUNT        iRow,
   DB_LORDINAL       iColumn,
   OSPRW             *prwStatus);

Parameters

  • iRow
    [in] Position of the specified row. A value of -1 indicates all rows.

  • iColumn
    [in] Position of the specified column. A value of -1 indicates all columns.

  • prwStatus
    [out] Enumerated value indicating the returned read/write status of a specified cell, row, column, or data set. (See table below for descriptions.)

Return Codes

  • S_OK
    The method succeeded.

  • E_FAIL
    A provider-specific error occurred.

Comments

getRWStatus uses the following enumeration:

typedef enum OSPRW {
   OSPRW_READONLY = 0,
   OSPRW_DEFAULT = 1,
   OSPRW_READWRITE = 1,
   OSPRW_MIXED = 2
};

The preceding values are defined in the following table.

Value

Meaning

OSPRW_READONLY

Cell, row, column, or data set is read-only.

OSPRW_DEFAULT OSPRW_READWRITE

Cell, row, column, or data set can be modified (the default).

OSPRW_MIXED

Cell, row, column, or data set read/write status is unknown; or row, column, or data set is of mixed status.

If the *prwStatus is OSPRW_MIXED, most callers will treat it as read/write (OSPRW_READWRITE). A "lazy" provider should return a *prwStatus value of OSPRW_MIXED.