<?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>topic Re: How to export data to a SQL Database on Model Stop in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529336#M38447</link>
    <description>&lt;P&gt;Hey &lt;A rel="user" href="https://answers.flexsim.com/users/6216/abhishekk.html" nodeid="6216"&gt;@Abhishek K&lt;/A&gt;, was my answer helpful for you? If so, could you accept it? Otherwise, how else can I help?&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2019 21:09:20 GMT</pubDate>
    <dc:creator>benjamin_w2</dc:creator>
    <dc:date>2019-07-10T21:09:20Z</dc:date>
    <item>
      <title>How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529331#M38442</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 18.1.2 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have built a model in which I want to pull input data from a SQL database using a Database Connector, and then export the output to a table in that same SQL database. I am using Flexsim 18.1.&lt;/P&gt;
&lt;P&gt;The question I have is - How to automatically export the data on model stop ?&lt;/P&gt;
&lt;P&gt;I will be using windows task scheduler to run the model everyday at a specific time and on model open and reset, I'll refresh the input data. Then, the model will run for a specified time and "on model stop" , I want to write the result to the SQL database.&lt;/P&gt;
&lt;P&gt;There is a provision to import data on model reset from the SQL database, but I dont know how to export the data based on the on model stop trigger.&lt;/P&gt;
&lt;P&gt;&lt;A id="18794" href="https://answers.flexsim.com/storage/attachments/18794-data-export.png"&gt;data-export.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 21:22:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529331#M38442</guid>
      <dc:creator>abhishek_k</dc:creator>
      <dc:date>2019-04-26T21:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529332#M38443</link>
      <description>&lt;A rel="user" href="https://answers.flexsim.com/users/6216/abhishekk.html" nodeid="6216"&gt;@Abhishek K&lt;/A&gt;&lt;P&gt;Have you ever used 'On Run Stop' trigger in the "ToolBox&amp;gt;Modeling Logic&amp;gt;Model Trigger&amp;gt;On Run Stop" option menu?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18795-2019-04-27-064437.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499044i1E3B8321C125C2CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="18795-2019-04-27-064437.png" alt="18795-2019-04-27-064437.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 21:37:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529332#M38443</guid>
      <dc:creator>SimFlex_support</dc:creator>
      <dc:date>2019-04-26T21:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529333#M38444</link>
      <description>&lt;P&gt;Thank you for the response, I have used it, but I dont know the scipt that is needed there to export data into a SQL database&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 21:57:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529333#M38444</guid>
      <dc:creator>abhishek_k</dc:creator>
      <dc:date>2019-04-26T21:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529334#M38445</link>
      <description>&lt;P&gt;I tried to toggle the export node as flexscript and then used nodefuntion() to execute it but that is not working either&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="18796-toggle-node.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1499046i8EDC138D325C245B/image-size/large?v=v2&amp;amp;px=999" role="button" title="18796-toggle-node.png" alt="18796-toggle-node.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 22:47:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529334#M38445</guid>
      <dc:creator>abhishek_k</dc:creator>
      <dc:date>2019-04-26T22:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529335#M38446</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.flexsim.com/questions/65615/view.html#"&gt;@Abhishek K&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;The following code should help. make sure to correctly configure your Data Base Connector.&lt;/P&gt;&lt;P&gt;Also note, the "On Model Stop" trigger may not be the best place to use this code, since it will fire every time you hit the stop button. Consider designing a user event in the Toolbox or using Process Flow to export your data at a certain time.&lt;/P&gt;&lt;P&gt;function_s(model().find("Tools/DatabaseConnectors/DBConnector1"), "exportAll");&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 16:38:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529335#M38446</guid>
      <dc:creator>benjamin_w2</dc:creator>
      <dc:date>2019-06-26T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529336#M38447</link>
      <description>&lt;P&gt;Hey &lt;A rel="user" href="https://answers.flexsim.com/users/6216/abhishekk.html" nodeid="6216"&gt;@Abhishek K&lt;/A&gt;, was my answer helpful for you? If so, could you accept it? Otherwise, how else can I help?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 21:09:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529336#M38447</guid>
      <dc:creator>benjamin_w2</dc:creator>
      <dc:date>2019-07-10T21:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529337#M38448</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;What if I only want to export the last row? and not all the rows...?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 May 2022 08:30:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529337#M38448</guid>
      <dc:creator>rafael_o9</dc:creator>
      <dc:date>2022-05-30T08:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to export data to a SQL Database on Model Stop</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529338#M38449</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;You should ask a new question but it sounds like you need need to add a single row to a table - you could use SQL's  "INSERT INTO"  for that.&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 May 2022 08:50:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-export-data-to-a-sql-database-on-model-stop/m-p/13529338#M38449</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2022-05-30T08:50:38Z</dc:date>
    </item>
  </channel>
</rss>

