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類別提供追蹤資料讀取功能,以及對該TraceServer類別TraceTableTraceFile、類別與類別共有的資料存取。

追蹤資料讀取功能也可在TraceReaderWriter類別中使用,該功能源自TraceReader類別,並用於類別與TraceFile類別的建構TraceTable

線程安全性

任何此類的公開靜態(共享於Microsoft Visual Basic)成員對多執行緒操作都是安全的。 任何實例成員都不保證具有執行緒安全性。

建構函式

名稱 Description
TraceReader()

初始化 TraceReader 類別的新執行個體。

欄位

名稱 Description
currentRow

指定當前的列。

屬性

名稱 Description
Depth

取得追蹤讀取器的深度值。

FieldCount

取得資料中的欄位數量。

IsClosed

取得 Boolean 指定追蹤讀取器是否關閉的屬性值。

Item[Int32]

取得索引位置指定的欄位。

Item[String]

取得指定名稱的欄位。

RecordsAffected

取得資料的記錄數量。

方法

名稱 Description
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)

指定欄位是否設為空。

IsNull(Int32)

會得到 Boolean 一個值,指定欄位位置的資料值是否為空值。

NextResult()

移動到追蹤中的下一個結果。

Read()

讀取追蹤紀錄。

TranslateSubclass(String, String, Int32)

翻譯了子職業。

適用於