DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: remote update...URGENT!

  1. #1
    Join Date
    May 2001
    Location
    Atlanta US
    Posts
    262
    Hi Gurus,
    Can anyone give a small pseudocode for the following:

    A proc accepts an arg, taking this it updates a table on a remote DB from the current DB.
    It returns 0 if the commit occurs in the remote DB.
    Else it returns 1
    and rolls back the transaction in the current DB.

    Thanks guys!
    __________________
    Hemant
    Hemant

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Create a dblink to your remote database.

    write a functon which would take the parameters from the procedure, set a save point and then do the update using the dblink, if there are any exceptions, issue the roll back and return 1, else commit and return 0.

    Bundle it as a package in your system and execute it.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

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


Click Here to Expand Forum to Full Width