<?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 problem with DynamicUpdateCommand when insert values that contain COMMA and semicolon in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/problem-with-DynamicUpdateCommand-when-insert-values-that/m-p/232647#M84247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all.&lt;/P&gt;&lt;P&gt;i am using DynamicUpdateCommand to insert values into a table: MyTable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table has 2 fields:&lt;/P&gt;&lt;P&gt;Name&lt;/P&gt;&lt;P&gt;Description&lt;/P&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;myStr= "INSERT INTO MyTable (varname1,varcontent1) VALUES (" &amp;amp; vName &amp;amp; "," &amp;amp; vDescription &amp;amp; ")"&lt;BR /&gt;objQVMain.DynamicUpdateCommand (myStr)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;this works great in most cases.&lt;/P&gt;&lt;P&gt;but if one of the values to insert contains a comma or a semikolon then strange things happens&lt;/P&gt;&lt;P&gt;i was able to make it work when there is a coma in the value by adding dblquots around it&lt;/P&gt;&lt;P&gt;but this doesnt work for if the value contains semikolon and then the app just hangs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my last try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;myStr= "INSERT INTO MyTable (Name,Description ) VALUES (" &amp;amp; """" &amp;amp; vName&amp;amp; """" &amp;amp; "," &amp;amp; """" &amp;amp; vDescription &amp;amp; """" &amp;amp; ")"&lt;BR /&gt;objQVMain.DynamicUpdateCommand (myStr)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;anyone ever had similiar problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Feb 2010 19:43:26 GMT</pubDate>
    <dc:creator>wizardo</dc:creator>
    <dc:date>2010-02-05T19:43:26Z</dc:date>
    <item>
      <title>problem with DynamicUpdateCommand when insert values that contain COMMA and semicolon</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-DynamicUpdateCommand-when-insert-values-that/m-p/232647#M84247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all.&lt;/P&gt;&lt;P&gt;i am using DynamicUpdateCommand to insert values into a table: MyTable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table has 2 fields:&lt;/P&gt;&lt;P&gt;Name&lt;/P&gt;&lt;P&gt;Description&lt;/P&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;myStr= "INSERT INTO MyTable (varname1,varcontent1) VALUES (" &amp;amp; vName &amp;amp; "," &amp;amp; vDescription &amp;amp; ")"&lt;BR /&gt;objQVMain.DynamicUpdateCommand (myStr)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;this works great in most cases.&lt;/P&gt;&lt;P&gt;but if one of the values to insert contains a comma or a semikolon then strange things happens&lt;/P&gt;&lt;P&gt;i was able to make it work when there is a coma in the value by adding dblquots around it&lt;/P&gt;&lt;P&gt;but this doesnt work for if the value contains semikolon and then the app just hangs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my last try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;myStr= "INSERT INTO MyTable (Name,Description ) VALUES (" &amp;amp; """" &amp;amp; vName&amp;amp; """" &amp;amp; "," &amp;amp; """" &amp;amp; vDescription &amp;amp; """" &amp;amp; ")"&lt;BR /&gt;objQVMain.DynamicUpdateCommand (myStr)&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;anyone ever had similiar problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2010 19:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-DynamicUpdateCommand-when-insert-values-that/m-p/232647#M84247</guid>
      <dc:creator>wizardo</dc:creator>
      <dc:date>2010-02-05T19:43:26Z</dc:date>
    </item>
  </channel>
</rss>

