internal static OdbcException CreateException(OdbcErrorCollection errors, ODBC32.RetCode retcode)
        {
            StringBuilder builder = new StringBuilder();

            foreach (OdbcError error in errors)
            {
                if (builder.Length > 0)
                {
                    builder.Append(Environment.NewLine);
                }
                builder.Append(Res.GetString("Odbc_ExceptionMessage", new object[] { ODBC32.RetcodeToString(retcode), error.SQLState, error.Message }));
            }
            return(new OdbcException(builder.ToString(), errors));
        }
예제 #2
0
        internal static OdbcException CreateException(OdbcErrorCollection errors, ODBC32.RetCode retcode)
        {
            StringBuilder builder = new StringBuilder();

            foreach (OdbcError error in errors)
            {
                if (builder.Length > 0)
                {
                    builder.Append(Environment.NewLine);
                }

                builder.Append(SR.GetString(SR.Odbc_ExceptionMessage, ODBC32.RetcodeToString(retcode), error.SQLState, error.Message)); // MDAC 68337
            }
            OdbcException exception = new OdbcException(builder.ToString(), errors);

            return(exception);
        }
예제 #3
0
 internal static Exception FailedToGetDescriptorHandle(ODBC32.RetCode retcode)
 {
     return(ADP.DataAdapter(Res.GetString("Odbc_FailedToGetDescriptorHandle", new object[] { ODBC32.RetcodeToString(retcode) })));
 }
예제 #4
0
 internal static Exception CantEnableConnectionpooling(ODBC32.RetCode retcode)
 {
     return(ADP.DataAdapter(Res.GetString("Odbc_CantEnableConnectionpooling", new object[] { ODBC32.RetcodeToString(retcode) })));
 }
예제 #5
0
 internal static Exception CantAllocateEnvironmentHandle(ODBC32.RetCode retcode)
 {
     return(ADP.DataAdapter(Res.GetString("Odbc_CantAllocateEnvironmentHandle", new object[] { ODBC32.RetcodeToString(retcode) })));
 }
예제 #6
0
파일: Odbc32.cs 프로젝트: krishvoor/runtime
 internal static Exception FailedToGetDescriptorHandle(ODBC32.RetCode retcode)
 {
     return(ADP.DataAdapter(SR.GetString(SR.Odbc_FailedToGetDescriptorHandle, ODBC32.RetcodeToString(retcode))));
 }
예제 #7
0
파일: Odbc32.cs 프로젝트: krishvoor/runtime
 internal static Exception CantAllocateEnvironmentHandle(ODBC32.RetCode retcode)
 {
     return(ADP.DataAdapter(SR.GetString(SR.Odbc_CantAllocateEnvironmentHandle, ODBC32.RetcodeToString(retcode))));
 }
예제 #8
0
파일: Odbc32.cs 프로젝트: krishvoor/runtime
 internal static Exception CantEnableConnectionpooling(ODBC32.RetCode retcode)
 {
     return(ADP.DataAdapter(SR.GetString(SR.Odbc_CantEnableConnectionpooling, ODBC32.RetcodeToString(retcode))));
 }