Share via


TraceReader 类

定义

TraceReader 类是一个抽象的 Trace 对象类,用于 TraceServer 类、TraceTable 类和 TraceFile 类的构造中。

public ref class TraceReader : IDisposable, System::Data::IDataReader
[System.Runtime.InteropServices.ComVisible(false)]
public class TraceReader : IDisposable, System.Data.IDataReader
[<System.Runtime.InteropServices.ComVisible(false)>]
type TraceReader = class
    interface IDataReader
    interface IDisposable
    interface IDataRecord
Public Class TraceReader
Implements IDataReader, IDisposable
继承
TraceReader
派生
属性
实现

示例

使用 SQL Server Profiler

注解

TraceReader类提供跟踪数据读取功能和对类、TraceTable类和TraceFile类通用TraceServer的数据的访问权限。

跟踪数据读取功能也可用于TraceReaderWriter类,该类派生自TraceReader类,用于类和TraceFile类的TraceTable构造。

线程安全性

此类型的任何公共静态(Microsoft Visual Basic 中的 Shared)成员在多线程操作中是安全的。 但不保证所有实例成员都是线程安全的。

构造函数

TraceReader()

初始化 TraceReader 类的新实例。

字段

currentRow

指定当前行。

属性

Depth

获取跟踪读取器的深度值。

FieldCount

获取数据中的列数。

IsClosed

获取用于指定是否关闭跟踪读取器的 Boolean 属性值。

Item[Int32]

获取索引位置指定的列。

Item[String]

获取具有指定名称的列。

RecordsAffected

获取数据中的记录数目。

方法

Close()

关闭跟踪读取器。

Dispose()

删除跟踪读取器信息。

GetBoolean(Int32)

从指定的列位置处的记录返回 Boolean 值。

GetByte(Int32)

从指定的列位置处的记录返回 Byte 值。

GetBytes(Int32, Int64, Byte[], Int32, Int32)

从给定的缓冲区偏移量开始,按指定的列偏移量将字节流作为数组流入缓冲区。

GetChar(Int32)

获取指定列的字符值。

GetChars(Int32, Char[], Int32, Int32, Int32)

从指定的列位置处的记录获取字符数组值。

GetChars(Int32, Int64, Char[], Int32, Int32)

从指定的列位置处的记录获取字符数组值。

GetData(Int32)

返回在该字段指向远程数据结构时所使用的 IDataReader 对象。

GetDataTypeName(Int32)

获取指定的列位置处的数据值的数据类型。

GetDateTime(Int32)

获取指定的列位置处的数据值的 DateTime 值。

GetDecimal(Int32)

获取指定的列位置处的数据值的 Decimal 值。

GetDouble(Int32)

获取指定的列位置处的数据值的浮点值。

GetFieldType(Int32)

返回指定的列位置处的数据值的字段类型。

GetFloat(Int32)

获取指定的列位置处的数据值的浮点值。

GetGuid(Int32)

获取指定的列位置处的数据值的 Guid 系统值。

GetInt16(Int32)

获取指定的列位置处的数据值的小整数值。

GetInt32(Int32)

获取指定的列位置处的数据值的整数值。

GetInt64(Int32)

获取指定的列位置处的数据值的长整数值。

GetName(Int32)

获取指定的列位置处的字段的名称。

GetOrdinal(String)

获取指定的列位置处的数据值的序数值。

GetSchemaTable()

获取说明架构的表。

GetStream(Int32)

获取数据流。

GetString(Int32)

获取指定列位置处的 String 值。

GetTimeSpan(Int32)

获取指定的列位置处的数据值的 TimeSpan 值。

GetValue(Int32)

获取指定的列位置处的数据值的值。

GetValues(Object[])

获取指定的列位置处的数据值的值数组。

IsDBNull(Int32)

指定指定的列是否设置为 Null。

IsNull(Int32)

获取一个 Boolean 值,该值指定位于指定的列位置处的数据值是否为 Null。

NextResult()

移到跟踪中的下一个结果。

Read()

读取跟踪记录。

TranslateSubclass(String, String, Int32)

转换该子类。

适用于