ILog::TruncatePrefix method (txlogpub.h)

Throws away the specified prefix of the log, making it no longer retrievable.

Syntax

HRESULT TruncatePrefix(
  [in] LSN lsnFirstToKeep
);

Parameters

[in] lsnFirstToKeep

The LSN of the first record not to be thrown away. If this parameter is 0, the entire log is emptied.

Return value

This method can return the following values, as well as other HRESULT values.

Return code Description
S_OK
The log was successfully truncated.
E_INVALIDARG
lsnFirstToKeep is outside the current limits of the log. See ILog::GetLogLimits.

Remarks

This request is only a hint to the log implementation. The log is free to ignore the request, or to retain more than was strictly requested. Many ILog implementations will follow this latter option.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header txlogpub.h

See also

ILog