getValueEx Method

Log Parser

getValueEx Method

Returns the value of the field at the specified position in the record.
The value returned by the getValueEx method is intended for low-level programming languages and is not suitable for consumption by scripting languages.


C++ Syntax

HRESULT getValueEx(IN VARIANT *pindexOrName, OUT VARIANT *pVal);


Parameters

pindexOrName
A VT_I4 or VT_BSTR VARIANT containing either the 0-based index of the field in the query output records, or the name of the field in the query output records.
The index must be less than the number of fields returned by the getColumnCount method of the LogRecordSet object.


Return Value

The value of the specified field.
The value is returned as a VARIANT whose type depends on the data type of the field. The following table shows the VARIANT type returned for each of the Log Parser data types:
Field Type VARIANT Type Description
INTEGER VT_I8 64-bit integer
REAL VT_R8 64-bit floating-point number
STRING VT_BSTR String
TIMESTAMP VT_I8 64-bit integer representing the number of 100-nanosecond intervals since January 1, year 0
NULL VT_NULL VT_NULL VARIANT


Remarks

  • The getValueEx method returns 64-bit integer values that are not handled correctly by scripting languages, For this reason, the method is intended for use by low-level, non-scripting languages, such as C++. If you are developing an application using scripting languages, consider using the getValue method instead.



See also:

LogRecord Object
getValue Method
Log Parser COM API Overview
C# Example


© 2004 Microsoft Corporation. All rights reserved.