<?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 Implicit conversion from data type varchar to varbinary is not allowed. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Implicit-conversion-from-data-type-varchar-to-varbinary-is-not/m-p/296290#M109878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I insert data into database by Macro, I got this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim sConn, oConn&lt;/P&gt;&lt;P&gt;Set oConn = CreateObject("ADODB.Connection")&lt;/P&gt;&lt;P&gt;sConn = "******************************************************************"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set TableBox = ActiveDocument.GetSheetObject( "CH39" )&lt;BR /&gt;CellRect = ActiveDocument.GetApplication().GetEmptyRect()&lt;BR /&gt;CellRect.Top = 0&lt;BR /&gt;CellRect.Left = 0&lt;BR /&gt;CellRect.Width = TableBox.GetColumnCount&lt;BR /&gt;CellRect.Height = TableBox.GetRowCount&lt;BR /&gt;set CellMatrix = TableBox.GetCells( CellRect )&lt;BR /&gt;for RowIter=1 to CellRect.Height-1&lt;BR /&gt;&amp;nbsp; vFinancialClass=CellMatrix(RowIter)(0).Text&lt;BR /&gt;&amp;nbsp; vPayment=CellMatrix(RowIter)(1).Text&amp;nbsp; sSQL="insert into dbo.tmp_temp(FinancialClass) values('"&amp;amp;vPayment&amp;amp;"')"&lt;BR /&gt;&amp;nbsp; oConn.Execute(sSQL)&lt;BR /&gt;next&lt;BR /&gt;oConn.Close&lt;BR /&gt;Set oConn = Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to convert?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2011 09:13:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-08-24T09:13:43Z</dc:date>
    <item>
      <title>Implicit conversion from data type varchar to varbinary is not allowed.</title>
      <link>https://community.qlik.com/t5/QlikView/Implicit-conversion-from-data-type-varchar-to-varbinary-is-not/m-p/296290#M109878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I insert data into database by Macro, I got this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query."&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim sConn, oConn&lt;/P&gt;&lt;P&gt;Set oConn = CreateObject("ADODB.Connection")&lt;/P&gt;&lt;P&gt;sConn = "******************************************************************"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set TableBox = ActiveDocument.GetSheetObject( "CH39" )&lt;BR /&gt;CellRect = ActiveDocument.GetApplication().GetEmptyRect()&lt;BR /&gt;CellRect.Top = 0&lt;BR /&gt;CellRect.Left = 0&lt;BR /&gt;CellRect.Width = TableBox.GetColumnCount&lt;BR /&gt;CellRect.Height = TableBox.GetRowCount&lt;BR /&gt;set CellMatrix = TableBox.GetCells( CellRect )&lt;BR /&gt;for RowIter=1 to CellRect.Height-1&lt;BR /&gt;&amp;nbsp; vFinancialClass=CellMatrix(RowIter)(0).Text&lt;BR /&gt;&amp;nbsp; vPayment=CellMatrix(RowIter)(1).Text&amp;nbsp; sSQL="insert into dbo.tmp_temp(FinancialClass) values('"&amp;amp;vPayment&amp;amp;"')"&lt;BR /&gt;&amp;nbsp; oConn.Execute(sSQL)&lt;BR /&gt;next&lt;BR /&gt;oConn.Close&lt;BR /&gt;Set oConn = Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to convert?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 09:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Implicit-conversion-from-data-type-varchar-to-varbinary-is-not/m-p/296290#M109878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-24T09:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Implicit conversion from data type varchar to varbinary is not allowed.</title>
      <link>https://community.qlik.com/t5/QlikView/Implicit-conversion-from-data-type-varchar-to-varbinary-is-not/m-p/296291#M109879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First make sure what type of field FinancialClass is (varchar, varbinary, char, int, etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, modify the INSERT query to adapt to that data type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;sSQL = "INSERT INTO dbo.tmp_temp (FinancialClass) VALUES (CAST('" &amp;amp; vPayment &amp;amp; "' AS VARCHAR(100)))"&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using VARCHAR(100) as an example, your database may be different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 09:30:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Implicit-conversion-from-data-type-varchar-to-varbinary-is-not/m-p/296291#M109879</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-24T09:30:25Z</dc:date>
    </item>
  </channel>
</rss>

