public method O2GMessagesTable.getNextRowByColumnValue

Brief

Gets the next row from O2GMessagesTable based on the column value.

Declaration
C#
bool  getNextRowByColumnValue (string columnID, object columnValueAsVariant, O2GTableIterator iterator, out O2GMessageTableRow row)

Parameters
columnID

The name of a column in the Messages table. For example, From.

columnValueAsVariant

The value of the column specified by the columnId parameter. For example, if you want to search the Messages table for messages from a specific sender only, the columnId parameter value is From, the columnValue parameter value is the sender's login ID.

iterator

The table iterator.

row

[out] The row fetched.

Details

This method allows finding all rows that contain the specified column value.
If the row is not found, the method returns false.

Example

Get messages from a specific sender [hide]

    public void EnumerateMessagesBySender(string sSender)
    {
        O2GMessagesTable messages = mTblMgr.getTable(O2GTableType.Messages);
        O2GTableIterator iterator = new O2GTableIterator();
        O2GmessageTableRow message = null;
        while (messages.getNextRowByColumnValue("From", sSender, iterator, out message))
        {
            Console.WriteLine("MsgID={0}, From={1}, To={2}", message.MsgID, message.From, message.To);
        }
    }

Declared in O2GMessagesTable

back