SqlError::ToString Method ()

 

Gets the complete text of the error message.

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

public:
virtual String^ ToString() override

Return Value

Type: System::String^

The complete text of the error.

The string is in the form "SqlError:", followed by the Message, and the stack trace. For example:

SqlError:UserId or Password not valid. <stack trace>

The following example displays each SqlError within the SqlErrorCollection collection.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: