• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

oracle exception

 
Ranch Hand
Posts: 398
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Blueberry pie is best when it is firm and you can hold in your hand. Smell it. And smell this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic