OdbcError.NativeError 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 data source-specific error information.
public:
property int NativeError { int get(); };
public int NativeError { get; }
member this.NativeError : int
Public ReadOnly Property NativeError As Integer
Property Value
The data source-specific error information.
Examples
The following example displays the properties of the OdbcError.
public void DisplayOdbcErrorCollection(OdbcException exception)
{
for (int i = 0; i < exception.Errors.Count; i++)
{
Console.WriteLine("Index #" + i + "\n" +
"Message: " + exception.Errors[i].Message + "\n" +
"Native: " + exception.Errors[i].NativeError.ToString() + "\n" +
"Source: " + exception.Errors[i].Source + "\n" +
"SQL: " + exception.Errors[i].SQLState + "\n");
}
Console.ReadLine();
}
Public Sub DisplayOdbcErrorCollection(ByVal exception As OdbcException)
Dim i As Integer
For i = 0 To exception.Errors.Count - 1
Console.WriteLine("Index #" & i.ToString() & ControlChars.Cr _
& "Message: " & exception.Errors(i).Message & ControlChars.Cr _
& "Native: " & exception.Errors(i).NativeError.ToString() & ControlChars.Cr _
& "Source: " & exception.Errors(i).Source & ControlChars.Cr _
& "SQL: " & exception.Errors(i).SQLState & ControlChars.Cr)
Next i
Console.ReadLine()
End Sub
Applies to
See also
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.