STRING_TYPE Property

Log Parser

STRING_TYPE Property

The constant value returned by the getColumnType method to indicate that an output record field contains values of the STRING data type.

Read-only property.

Script Syntax

value = objRecordSet.STRING_TYPE;


Return Value

An integer value containing the constant that represents the STRING data type.


Examples

JScript example:

var oLogQuery = new ActiveXObject("MSUtil.LogQuery");

// Create query text
var strQuery = "SELECT * FROM System";

// Execute query and receive a LogRecordSet
var oRecordSet = oLogQuery.Execute( strQuery );

// Display field names and types
for( var f=0; f<oRecordSet.getColumnCount(); f++ )
{
    // Field Name
    WScript.Echo( "Field Name: " + oRecordSet.getColumnName(f) );

    // Field type
    switch( oRecordSet.getColumnType(f) )
    {
        case oRecordSet.INTEGER_TYPE:       {
                                                WScript.Echo( "Field Type: INTEGER");
                                                break;
                                            }

        case oRecordSet.REAL_TYPE:          {
                                                WScript.Echo( "Field Type: REAL");
                                                break;
                                            }

        case oRecordSet.STRING_TYPE:        {
                                                WScript.Echo( "Field Type: STRING");
                                                break;
                                            }

        case oRecordSet.TIMESTAMP_TYPE:     {
                                                WScript.Echo( "Field Type: TIMESTAMP");
                                                break;
                                            }

        case oRecordSet.NULL_TYPE:          {
                                                WScript.Echo( "Field Type: NULL");
                                                break;
                                            }
    }
    
}

// Close LogRecordSet
oRecordSet.close();

VBScript example:

Dim oLogQuery
Dim oRecordSet
Dim f

Set oLogQuery = CreateObject("MSUtil.LogQuery")

' Create query text
strQuery = "SELECT * FROM System"

' Execute query and receive a LogRecordSet
Set oRecordSet = oLogQuery.Execute ( strQuery )

' Display field names and types
For f = 0 To oRecordSet.getColumnCount()-1

    ' Field Name
    WScript.Echo "Field Name: " & oRecordSet.getColumnName(f)

    ' Field type
    Select Case oRecordSet.getColumnType(f)
    
        Case oRecordSet.INTEGER_TYPE        WScript.Echo "Field Type: INTEGER" 
        Case oRecordSet.REAL_TYPE           WScript.Echo "Field Type: REAL"
        Case oRecordSet.STRING_TYPE         WScript.Echo "Field Type: STRING"
        Case oRecordSet.TIMESTAMP_TYPE      WScript.Echo "Field Type: TIMESTAMP"
        Case oRecordSet.NULL_TYPE           WScript.Echo "Field Type: NULL"

    End Select
    
Next

' Close LogRecordSet
oRecordSet.close()


See also:

INTEGER_TYPE Property
NULL_TYPE Property
REAL_TYPE Property
TIMESTAMP_TYPE Property
LogRecordSet Object
Log Parser COM API Overview
C# Example


© 2004 Microsoft Corporation. All rights reserved.