#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    How to write transaction in stored procedure in firebirdsql?


    H!

    Can anyone please tell me how to write transaction in stored procedure in firebirdsql? what is the syntax for it ?

    please reply itz urgent ..

    Thank you

    Regards
    Vijay Gaur
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    19
    Rep Power
    0

    Commiting within stored procedure


    Originally Posted by vijaygaur1984
    H!

    Can anyone please tell me how to write transaction in stored procedure in firebirdsql? what is the syntax for it ?

    please reply itz urgent ..

    Thank you

    Regards
    Vijay Gaur
    It depends really on what you are trying to do.

    If you need to commit some records that you do not mind being left if there is an exception that rolls back the rest of the work by the procedure then you can use an autonomous transaction within the stored procedure for writing those records.

    If you mean for everything done in the stored procedure then you should be doing that from outside the procedure within your calling application.

    For more information on the autonomous transaction have a look a

    IN AUTONOMOUS TRANSACTION

    I would say that normally writing records that cannot be rolled back is dangerous but it can be exceptionally useful for debugging.

IMN logo majestic logo threadwatch logo seochat tools logo