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)); }
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); }
internal static Exception FailedToGetDescriptorHandle(ODBC32.RetCode retcode) { return(ADP.DataAdapter(Res.GetString("Odbc_FailedToGetDescriptorHandle", new object[] { ODBC32.RetcodeToString(retcode) }))); }
internal static Exception CantEnableConnectionpooling(ODBC32.RetCode retcode) { return(ADP.DataAdapter(Res.GetString("Odbc_CantEnableConnectionpooling", new object[] { ODBC32.RetcodeToString(retcode) }))); }
internal static Exception CantAllocateEnvironmentHandle(ODBC32.RetCode retcode) { return(ADP.DataAdapter(Res.GetString("Odbc_CantAllocateEnvironmentHandle", new object[] { ODBC32.RetcodeToString(retcode) }))); }
internal static Exception FailedToGetDescriptorHandle(ODBC32.RetCode retcode) { return(ADP.DataAdapter(SR.GetString(SR.Odbc_FailedToGetDescriptorHandle, ODBC32.RetcodeToString(retcode)))); }
internal static Exception CantAllocateEnvironmentHandle(ODBC32.RetCode retcode) { return(ADP.DataAdapter(SR.GetString(SR.Odbc_CantAllocateEnvironmentHandle, ODBC32.RetcodeToString(retcode)))); }
internal static Exception CantEnableConnectionpooling(ODBC32.RetCode retcode) { return(ADP.DataAdapter(SR.GetString(SR.Odbc_CantEnableConnectionpooling, ODBC32.RetcodeToString(retcode)))); }