• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

oracle exception

 
vasu maj
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have stored procedure which takes in a bunch of paramaters and inserts a row in a table. When one of the parameters happens to be larger than the size of the column of the database table I am gettting back an error whose decription is "value trying to insert is larger than the column size". It takes me some time figuring out which column it is complaining about. We are going to do some validation at the UI but I was curious to knwo if there is a way to get back the name of the column in the error message. Can we force Oracle to give more descriptive error which includes the name of the column?


Thanks,

Vasu
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vasu,
I don't think that is possible. You could use metadata to check the size of each column before inserting the row. But this is slow and you are better off just sticking some constants in a file somewhere.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic