Re: How do I capture content of an ODBC error message from Oracle?
From: John Smith (johnDOTsmithATbromleyhospitalsDOTnhsDOTuk)
Date: 11/10/04
- Next message: PJ: "Re: Taskbar"
- Previous message: PJ: "RE: Subform Editing problem"
- In reply to: sjlevine34: "How do I capture content of an ODBC error message from Oracle?"
- Next in thread: sjlevine34: "Re: How do I capture content of an ODBC error message from Oracle?"
- Reply: sjlevine34: "Re: How do I capture content of an ODBC error message from Oracle?"
- Messages sorted by: [ date ] [ thread ]
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?
- Next message: PJ: "Re: Taskbar"
- Previous message: PJ: "RE: Subform Editing problem"
- In reply to: sjlevine34: "How do I capture content of an ODBC error message from Oracle?"
- Next in thread: sjlevine34: "Re: How do I capture content of an ODBC error message from Oracle?"
- Reply: sjlevine34: "Re: How do I capture content of an ODBC error message from Oracle?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading