2 Replies Latest reply: Mar 6, 2013 6:19 PM by 991448 RSS

    How to Get DataBase response back to DB adapter

    941875
      Hi ,

      I have a requirment as below.

      1)I have configured a database adapter for updating a record in table using the pure SQL option .Once the record is updated sucessfully I need to get response from Database as Zero records updated or 1 row updated.

      How can I get that database response back to my Database adpter. I have to implement this at OSB .

      Awaiting for a Response ASAP.

      Regards
      Vikram
        • 1. Re: How to Get DataBase response back to DB adapter
          Durga Charan
          Hi,

          As insert on DB is a one way operation. You can check when you created the DB adapter , with pure SQL statement the XSD was not having any return element created in it.

          In OSB you will need to use publish action for pushing data into the DB as service callout will not work.
          One more thing you can do, use route node to insert data through BS , this will ultimately make sure that error is returned back (when insert fails) .

          Thanks,
          Durga


          - It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
          • 2. Re: How to Get DataBase response back to DB adapter
            991448
            You can use publish action for pushing data into the DB and setting the routing option for the publish node to exactly once and use a fault handler. If you do not get a fault then you be pretty assured that the record has been inserted. If you really want the count you can keep the count of records before and after the insert operation is called.