SqlErrorCollection::Item Property (Int32)
.NET Framework (current version)
Gets the error at the specified index.
Assembly: System.Data (in System.Data.dll)
Parameters
- index
-
Type:
System::Int32
The zero-based index of the error to retrieve.
Property Value
Type: System.Data.SqlClient::SqlError^A SqlError that contains the error at the specified index.
| Exception | Condition |
|---|---|
| IndexOutOfRangeException | Index parameter is outside array bounds. |
The following example displays each SqlError within the SqlErrorCollection collection.
.NET Framework
Available since 1.1
Available since 1.1
Show: