Condividi tramite


ReadErrorLog Method

Questa caratteristica verrà rimossa a partire da una delle prossime versioni di Microsoft SQL Server. Evitare di utilizzare questa funzionalità in un nuovo progetto di sviluppo e prevedere interventi di modifica nelle applicazioni in cui è attualmente implementata.

The ReadErrorLog method returns a QueryResults object enumerating the contents of a Microsoft SQL Server error log.

Sintassi

object.ReadErrorLog( [ LogNumber ] )as QueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • LogNumber
    Optional. A long integer that indicates an error log number. When not specified, the current error log is enumerated.

Prototype (C/C++)

HRESULT ReadErrorLog(
LPSQLDMOQUERYRESULTS* ppResults,
long lLogNumber = 0);

Returns

A QueryResults object containing one result set defined by the following:

Column

Data type

Description

Varies, as described in Remarks

nvarchar(256)

Log entry descriptive text.

ContinuationRow

tinyint

When 0, the descriptive text returned in the first column is complete. When 1, the descriptive text should be interpreted as a continuation of the previous row's contents.

Osservazioni

In the returned QueryResults object, the ColumnName property of the first column reports the operating system file name of the file used to maintain the log.

Applies To: