Re: How do I capture content of an ODBC error message from Oracle?

From: John Smith (johnDOTsmithATbromleyhospitalsDOTnhsDOTuk)
Date: 11/10/04


Date: Wed, 10 Nov 2004 16:08:14 -0000

These errors are in the errors collection and there may be more than one of
them. For similar reasons I have just written the following function to
retrieve them:

Public Function GetDAOErrors() As String
  Dim errX As Error, Message As String
  On Error Resume Next
  Message = ""
  If Errors.Count > 0 Then
    For Each errX In DBEngine.Errors
      Message = Message & errX.Description & vbCrLf
    Next errX
  End If
  GetDAOErrors = Message
End Function

I call this from the event error trap, with a little modification I think that
it will do what you want.

-- 
HTH
John
"sjlevine34" <sjlevine34@discussions.microsoft.com> wrote in message
news:82A1A5D3-D4F4-48E8-9B9D-52F618879160@microsoft.com...
> I am using Microsoft Access as a front end for an Oracle database.  All of
> the data validation is done in the Oracle Tables through the use of triggers.
>  The error messages are ones I coded for as user-defined exceptions with
> concise user-friendly descriptions.   They display in their entirety in the
> forms I use to maintain the tables.  For example, the following error message
> may be displayed:
>    ODBC--insert on a linked table 'OBI_DONOR_EMAIL' failed.
>   [Oracle][ODBC][Ora]ORA-20700: Email address cannot be blank.
>   ORA-06512: at "OBIEBIS.OBI_DONOR_EMAIL_T2", line 23
>   ORA-04088: error during execution of trigger 'OBIEBIS.OBI_DONOR_EMAIL_T2'
>    (#20700)
> I would like to, through the use of the form on error event and the mid()
> function, display the error message as "Email address cannot be blank.".
> Despite extensive searching, I have not been able to find the object holding
> the message "[Oracle][ODBC][Ora]ORA-20700: Email address cannot be blank.
> <LF><LF> ORA-06512: at "OBIEBIS.OBI_DONOR_EMAIL_T2", line 23 <LF> ORA-04088:
> error during execution of trigger 'OBIEBIS.OBI_DONOR_EMAIL_T2' (#20700)".  I
> know it has to be there because the message box displays the error after
> completion of the form on error event procedure.
> Does anyone know where this error message resides in access and how I can
> get at it during the form error event procedure?


Relevant Pages

  • Re: Wine Database - One bottle to one bin question
    ... error in the form's error event. ... Response As Integer) ... Is there a way I can trap that error message and redescribe it to ... select RowNumber and ColumnNumber fields and then select ...
    (microsoft.public.access.gettingstarted)
  • How do I capture content of an ODBC error message from Oracle?
    ... I am using Microsoft Access as a front end for an Oracle database. ... through the use of the form on error event and the mid ... display the error message as "Email address cannot be blank.". ...
    (microsoft.public.access.formscoding)
  • laptop shuts down
    ... I don't know why the error message "VistaDB." ... I tried to restore again and the same message comes up and the it gets ... I was told by Kodak ... MCLog Event Error Event ID 5022 ...
    (microsoft.public.windowsxp.help_and_support)
  • The Kerberos subsystems encountered a PAC verification error
    ... I am receing the following error Event ID 7 "The kerberos subsystem ... encountered a PAC verification failure. ... When I enter the command Sc query KDCSVC I ... this cause and how do you go about resolving this error message. ...
    (microsoft.public.security)
  • Re: D3/Linux program abort
    ... same sort of fire could occur anywhere. ... Most developers are ... error message so that we can get through diagnostics quickly and get ... There's also the "techno error" that developers tend to display when ...
    (comp.databases.pick)

Loading