4 Replies Latest reply: Mar 15, 2013 3:43 AM by Christian.Shay -Oracle RSS

    simple but complete good practices example?

    946279
      Could you guys post simple example how to connect, invoke oracle procedure and handle errors in VB.NET? I'm very beginner in the subject and I would like to see some good practices example to analyze. I will be using Visual Studio 2010. Is there anything else that should be installed to work with Oracle? I would appreciate your answers. Let's assume that on oracle the following procedure exists:
      create or replace procedure test
      is
        user_exception exception;
        user_exception_v number := -20999;
        pragma exception_init( user_exception, -20999 );
      begin
        if dbms_random.value <= 0.5 then raise DUP_VAL_ON_INDEX;
        else raise ZERO_DIVIDE;
        end if;
      exception
        when ZERO_DIVIDE then raise_application_error( user_exception_v, 'user exception raised because of: ' || sqlerrm );
        when others then raise;
      end;