<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Database rollback functionality in node.js in xsa in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaa-p/11885130#M4461986</link>
    <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;thomas.jung&lt;/SPAN&gt; - Hi Thomas , I followed your videos in youtube and implemented the functionality . Could you please help with the database rollback functionality in node.js  using await and async.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2019 15:33:06 GMT</pubDate>
    <dc:creator>former_member427610</dc:creator>
    <dc:date>2019-06-27T15:33:06Z</dc:date>
    <item>
      <title>Database rollback functionality in node.js in xsa</title>
      <link>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaq-p/11885129</link>
      <description>&lt;P&gt;Hi Experts, &lt;/P&gt;
  &lt;P&gt;I am developing an Node.js service to expose data from HANA in an MTA application in XSA. I have written Multiple inserts in an app.post to insert records in more than one table . I want the database to rollback the inserts if any of the insert fails. &lt;/P&gt;
  &lt;P&gt;Could you please suggest solutions to achieve the rollback functionality. I am using async and await in app.post() to execute the insert queries. &lt;/P&gt;
  &lt;P&gt; Below is the code snippets.&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1698668-apppost.png"&gt;apppost.png&lt;/A&gt; &lt;A href="https://answers.sap.com/storage/temp/1698669-dbpromise.png"&gt;dbpromise.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 15:07:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaq-p/11885129</guid>
      <dc:creator>former_member427610</dc:creator>
      <dc:date>2019-06-27T15:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Database rollback functionality in node.js in xsa</title>
      <link>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaa-p/11885130#M4461986</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;thomas.jung&lt;/SPAN&gt; - Hi Thomas , I followed your videos in youtube and implemented the functionality . Could you please help with the database rollback functionality in node.js  using await and async.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 15:33:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaa-p/11885130#M4461986</guid>
      <dc:creator>former_member427610</dc:creator>
      <dc:date>2019-06-27T15:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Database rollback functionality in node.js in xsa</title>
      <link>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaa-p/11885131#M4461987</link>
      <description>&lt;P&gt;By default the autoCommit option is set, so each inserts commits if no error occurred. One option to reach what you wanna have is to disable the auto commit using function setAutoCommit(false) on the db connection. Then do your inserts. In case of an error execute function rollback() on the db connection. In case of no error function success(). Afterwards (in both bases) enable the autoCommit option again.&lt;/P&gt;&lt;P&gt;If wanna do in general the commit/rollback handling by yourself you can set the autoCommit option to false when the db connection is created.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 17:28:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaa-p/11885131#M4461987</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2019-06-27T17:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Database rollback functionality in node.js in xsa</title>
      <link>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaa-p/11885132#M4461988</link>
      <description>&lt;P&gt;Thanks Florian . It worked. &lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 03:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/database-rollback-functionality-in-node-js-in-xsa/qaa-p/11885132#M4461988</guid>
      <dc:creator>former_member427610</dc:creator>
      <dc:date>2019-07-03T03:36:49Z</dc:date>
    </item>
  </channel>
</rss>

