Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 30th, 2004, 12:50 PM
Pearsonjv Pearsonjv is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Salt Lake City, UT
Posts: 5 Pearsonjv User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Return list of units w/errors from procedure

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.

Reply With Quote
  #2  
Old June 30th, 2004, 02:37 PM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 20 m 49 sec
Reputation Power: 48
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.

Reply With Quote
  #3  
Old June 30th, 2004, 04:21 PM
Pearsonjv Pearsonjv is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Salt Lake City, UT
Posts: 5 Pearsonjv User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks. Your reply had had a lot of good ideas which I'll use.

John

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Return list of units w/errors from procedure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT