Results 1 to 3 of 3
  1. #1
    arfeen.java is offline Member
    Join Date
    Nov 2012
    Posts
    5
    Rep Power
    0

    Default Handling SQLException

    Is there any way to fetch the column name name for which SQL exception occurred?

    For example a table MyTable is defined as --
    UID NOT NULL NUMBER
    AGE NUMBER

    Now if issue following insert it will raise ORA-01722-
    INSERT INTO testchild VALUES(5, 'tes')
    as AGE column expects a number, but we are providing a string.
    So i want in my JDBC program to get for which column (here age) this error occurred.

    Please help on this.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: Handling SQLException

    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    arfeen.java is offline Member
    Join Date
    Nov 2012
    Posts
    5
    Rep Power
    0

Similar Threads

  1. java.SQLException
    By naveen516 in forum Advanced Java
    Replies: 3
    Last Post: 12-08-2011, 02:51 PM
  2. java.sql.SQLException:
    By nandhinianand in forum New To Java
    Replies: 2
    Last Post: 09-28-2011, 08:15 AM
  3. java.sql.sqlException
    By harsimran05 in forum JDBC
    Replies: 1
    Last Post: 09-06-2011, 01:14 PM
  4. JDBC ODBC SQLException
    By JohnPringle83 in forum JDBC
    Replies: 6
    Last Post: 05-30-2011, 09:07 AM
  5. SQLException errors - need help!
    By DerekRaimann in forum JDBC
    Replies: 6
    Last Post: 01-27-2011, 11:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •