System.Data.SqlClient.SqlException.CreateException C# (CSharp) Method

CreateException() static private method

static private CreateException ( SqlErrorCollection errorCollection, string serverVersion ) : SqlException
errorCollection SqlErrorCollection
serverVersion string
return SqlException
        static internal SqlException CreateException(SqlErrorCollection errorCollection, string serverVersion)
        {
            return CreateException(errorCollection, serverVersion, Guid.Empty);
        }

Same methods

SqlException::CreateException ( SqlErrorCollection errorCollection, string serverVersion, System.Guid conId, Exception innerException = null ) : SqlException
SqlException::CreateException ( SqlErrorCollection errorCollection, string serverVersion, System.Data.SqlClient.SqlInternalConnectionTds internalConnection, Exception innerException = null ) : SqlException

Usage Example

Example #1
0
        internal static Exception CannotCompleteDelegatedTransactionWithOpenResults()
        {
            SqlErrorCollection errorCollection = new SqlErrorCollection();

            errorCollection.Add(new SqlError(-2, 0, 11, null, Res.GetString("ADP_OpenReaderExists"), "", 0));
            return(SqlException.CreateException(errorCollection, null));
        }
All Usage Examples Of System.Data.SqlClient.SqlException::CreateException