Syntax

expression.Number

expression A variable that represents an OLEDBError object.

Example

This example displays the error number and other error information returned by the most recent OLE DB query.

Visual Basic for Applications
Set objEr = Application.OLEDBErrors(1) MsgBox "The following error occurred:" & _ objEr.Number & ", " & objEr.Native & ", " & _ objEr.ErrorString & " : " & objEr.SqlState
number Number property

See also: