Catching warning messages sent by Oracle

J

Jess

I have an access-based interface talking to an Oracle database. Data
integrity rules are implemented in Oracle. Whenever a data integrity rule is
violated Access (or Oracle?) displays a warning message. Is there a way in
access to catch that message and make decisions based on it?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...1119&dg=microsoft.public.access.modulesdaovba
 
C

Clifford Bass

Hi Jess,

Standard error processing should catch the Oracle errors.

Public Sub MySub()

On Error Resume Next

' Do something associated with Oracle linked table that might cause error
If Err.Number = 0 Then
' Processing if no error
Else
' Processing related to error
' ...
Err.Clear ' Clear the error condition once no longer needed
' ...
End If

End Sub

Hope that helps,

Clifford Bass
 
T

Tony Toews [MVP]

Jess said:
I have an access-based interface talking to an Oracle database. Data
integrity rules are implemented in Oracle. Whenever a data integrity rule is
violated Access (or Oracle?) displays a warning message. Is there a way in
access to catch that message and make decisions based on it?

ACC2000: How to Trap Specific ODBC Error Messages
You can use the Errors collection to trap specific Open Database
Connectivity (ODBC) errors. However, you must loop through all of the
elements in the collection to access the ODBC error information.
http://support.microsoft.com/kb/209855


Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top