passing exception result

Last post 12-14-2007 5:08 AM by srijaya_ramaraju@yahoo.com. 2 replies.

Sort Posts:

  • passing exception result

    12-13-2007, 6:23 AM
    • Participant
      1,311 point Participant
    • nomercy007
    • Member since 07-08-2007, 5:41 AM
    • Posts 248

    Hi,

    I have stored procedure in ORACLE that inserts record in a table that has a unique-key constraint on 3 columns.

    I managed to handle the exception correctly in the stored procedure.

    My problem is at the data access layer (I use enterprise library with executenonquery() ) the number of affected rows returned is alway 1 even when the constraint violated and exception catched in the procedure.

  • Re: passing exception result

    12-13-2007, 3:09 PM
    • Star
      10,050 point Star
    • rmaiya
    • Member since 06-25-2007, 11:08 PM
    • Olympia, WA
    • Posts 1,559

    Looks like when you catch the error in ORACLE sp, you are selecting err into a variable and that is why it returns 1 number of rows effected. .NET doesnt know whether exception occured or not since you are handling that error inside the sp.

    Raghu
    (MCSD.NET, MCAD.NET, MCDBA)
    [Don't forget to click on Mark as answer on the post that helped you ]
  • Re: passing exception result

    12-14-2007, 5:08 AM

     As raghu suggested that may be u trapped the  error into a variable. Plz provide the code to check out

    Thank u

    Baba

     Please remember to click "Mark as Answer" on this post if it helped you. 

    Thank u

    Baba

    Please remember to click "Mark as Answer" on this post if it helped you.
Page 1 of 1 (3 items)