OleDbErrorCollection.Item[Int32] Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the error at the specified index.
public:
property System::Data::OleDb::OleDbError ^ default[int] { System::Data::OleDb::OleDbError ^ get(int index); };
public System.Data.OleDb.OleDbError this[int index] { get; }
member this.Item(int) : System.Data.OleDb.OleDbError
Default Public ReadOnly Property Item(index As Integer) As OleDbError
Parameters
- index
- Int32
The zero-based index of the error to retrieve.
Property Value
An OleDbError that contains the error at the specified index.
Remarks
The following example displays each OleDbError within the OleDbErrorCollection collection.
public void DisplayOleDbErrorCollection(OleDbException myException)
{
for (int i=0; i < myException.Errors.Count; i++)
{
MessageBox.Show("Index #" + i + "\n" +
"Message: " + myException.Errors[i].Message + "\n" +
"Native: " + myException.Errors[i].NativeError.ToString() + "\n" +
"Source: " + myException.Errors[i].Source + "\n" +
"SQL: " + myException.Errors[i].SQLState + "\n");
}
}
Applies to
See also
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.