|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am writing a procedure that needs to update records. If errors occur, I need to create a list with a unit number and error type associated with it to inform the user. I can see that it would be good to return such a list from the procedure or to write it out to a database.
Any ideas on the most efficient way to do this? Thanks. |
|
#2
|
|||
|
|||
|
Well yes:
Create a table with the following fields: Session id Activity Date Userid Error code Error message Unit number Unit description, maybe if it helps For every error insert into the table the above fields. Code:
INSERT INTO MYERRORTRANS
( USERENV('SESSIONID'),
SYSDATE,
USER,
SQLCODE,
SQLERRM,
'VALUE FOR UNIT NUMBER',
'VALUE FOR UNIT DESCIPTION');
Writing a report against this is super simple. Keep the data in there for a month or six, then have a routine prune old records if it turns out that accounting types do not try to dig back into the system looking for problems. You can see whodunit, whentheydunit, whattheydunitto. |
|
#3
|
|||
|
|||
|
Thanks. Your reply had had a lot of good ideas which I'll use.
John |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Return list of units w/errors from procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|