Menu

oracle output cursor patch

Developers
Pat Worth
2006-10-13
2013-04-25
  • Pat Worth

    Pat Worth - 2006-10-13

    Sujit,

    I had a need to patch some code around oracle output cursors that are closed when returned. basically, trying to get results out of a closed cursor results in an SQLException being thrown. SQLUnit treats this as an exception and the test case fails. there is an argument that says that is correct behavior. but there is an argument (mine) that says a closed cursor is very similar to an empty data set which could be ok.

    the net of it is that there is no way to stop that that exception from happening. so, i hacked in some code to allow the Cursor Closed exception and create an empty ResultSetBean.

    if you'd like, let me know if/how you would like my changes. they are pretty minor.

    thanks,
    pat

     
    • Sujit Pal

      Sujit Pal - 2006-10-15

      Hi Pat,

      Sure, thanks, I will patch the code if you send me a patch (or the classes which have changed, with details).

      The only question (and possible reservation) is what exception you are catching to find that the cursor is closed. Is this an Oracle JDBC only exception? If so, this will be a problem for non-Oracle users (the code will not compile for them).

      -sujit

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.