<?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/" version="2.0">
<channel>
<title><![CDATA[FLEXquarters.com Limited]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/]]></link>
<description />
<generator><![CDATA[Kayako case v4.66.2]]></generator>
<item>
<title><![CDATA[[QODBC-ALL] How FQSaveToCache works]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3103]]></link>
<guid isPermaLink="false"><![CDATA[96629f1aac6ddb7a7cfa82574b6722d4]]></guid>
<pubDate><![CDATA[Tue, 25 Nov 2025 12:33:41 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How FQSaveToCache works
How FQSaveToCache Works
The process involves a sequence of INSERT statements for the line items of a transaction, with the FQSaveToCache flag controlling when the data is sent to QuickBooks.2
1. Caching the Lines (FQSaveToCache ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How FQSaveToCache works</span></h2>
<h4><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How FQSaveToCache Works</span></span></h4>
<p data-path-to-node="4"><span class="citation-24">The process involves a sequence of </span><code>INSERT</code><span class="citation-24"> statements for the line items of a transaction, with the </span><code>FQSaveToCache</code><span class="citation-24 citation-end-24"> flag controlling when the data is sent to QuickBooks.<sup class="superscript" data-turn-source-index="2">2</sup></span></p>
<h3>1. Caching the Lines (<span class="math-inline" data-math="\text{FQSaveToCache} = \mathbf{1}">FQSaveToCache = 1</span>&nbsp;or <span class="math-inline" data-math="\mathbf{TRUE}">TRUE</span>)</h3>
<ul data-path-to-node="6">
<li>
<p data-path-to-node="6,0,0"><span class="citation-23">For the </span><strong>first</strong><span class="citation-23"> line item </span><code>INSERT</code><span class="citation-23"> statement, and </span><strong>all subsequent intermediate line items</strong><span class="citation-23">, you must set the </span><code>FQSaveToCache</code><span class="citation-23 citation-end-23"> value to<span class="citation-20 citation-end-20">&nbsp;1</span><span class="citation-19 citation-end-19">&nbsp;OR&nbsp;TRUE</span></span></p>
<ul data-path-to-node="6,0,1">
<li>
<p data-path-to-node="6,0,1,0,0"><strong>Action:</strong> When QODBC sees this value, it takes the data from the <code>INSERT</code> statement and <strong>stores it locally in a cache</strong> specific to your current QODBC connection.</p>
</li>
<li>
<p data-path-to-node="6,0,1,1,0"><strong>Result:</strong> The data is <strong>not yet written</strong> to the QuickBooks company file.</p>
</li>
</ul>
</li>
<li>
<p data-path-to-node="6,1,0"><em>Example (Conceptual):</em></p>
<div class="code-block ng-tns-c3409981523-24 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahcKEwjjjqvdpY2RAxUAAAAAHQAAAAAQYA">
<div class="code-block-decoration header-formatted gds-title-s ng-tns-c3409981523-24 ng-star-inserted"><span class="ng-tns-c3409981523-24">SQL</span>
<div class="buttons ng-tns-c3409981523-24 ng-star-inserted">&nbsp;</div>
</div>
<div class="formatted-code-block-internal-container ng-tns-c3409981523-24">
<div class="animated-opacity ng-tns-c3409981523-24">
<pre class="ng-tns-c3409981523-24"><code class="code-container formatted ng-tns-c3409981523-24" data-test-id="code-content"><span class="hljs-keyword">INSERT</span> <span class="hljs-keyword">INTO</span> "InvoiceLine" (...) <span class="hljs-keyword">VALUES</span> (..., <span class="hljs-number">1</span>) <span class="hljs-comment">-- First line, cache it</span>
<span class="hljs-keyword">INSERT</span> <span class="hljs-keyword">INTO</span> "InvoiceLine" (...) <span class="hljs-keyword">VALUES</span> (..., <span class="hljs-number">1</span>) <span class="hljs-comment">-- Second line, cache it</span></code></pre>
</div>
</div>
</div>
</li>
</ul>
<p data-path-to-node="7">&nbsp;</p>
<h3>2. Finalizing and Writing the Transaction (&nbsp;<span class="math-inline" data-math="\text{FQSaveToCache} = \mathbf{1}">FQSaveToCache = 0</span>&nbsp;or&nbsp;FALSE)</h3>
<ul data-path-to-node="8">
<li>
<p data-path-to-node="8,0,0"><span class="citation-20">For the </span><strong>last</strong><span class="citation-20"> line item </span><code>INSERT</code><span class="citation-20"> statement for that transaction, you must set the </span><code>FQSaveToCache</code><span class="citation-20 citation-end-20"> value to 0</span><span class="citation-19 citation-end-19">&nbsp;OR FALSE. If you do not include&nbsp;<code>FQSaveToCache</code><span class="citation-20 citation-end-20">&nbsp;field and value in the insert statement, it will be considered as&nbsp;<code>FQSaveToCache</code><span class="citation-20 citation-end-20">&nbsp;=0</span></span></span></p>
<ul data-path-to-node="8,0,1">
<li>
<p data-path-to-node="8,0,1,0,0"><strong>Action:</strong> When QODBC sees this value, it performs two main steps:</p>
<ol start="1" data-path-to-node="8,0,1,0,1">
<li>
<p data-path-to-node="8,0,1,0,1,0,0"><span class="citation-17">It combines the data from this final </span><code>INSERT</code><span class="citation-17"> statement with </span><strong>all the previous cached line items</strong><span class="citation-17 citation-end-17"> for the same connection.</span></p>
</li>
<li>
<p data-path-to-node="8,0,1,0,1,1,0">It sends this complete, combined transaction (header and all lines) as a <strong>single batch</strong> to QuickBooks via the QuickBooks SDK.</p>
</li>
</ol></li>
<li>
<p data-path-to-node="8,0,1,1,0"><strong>Result:</strong> The complete transaction is now permanently saved in your QuickBooks company file.</p>
</li>
</ul>
</li>
<li>
<p data-path-to-node="8,1,0"><em>Example (Conceptual):</em></p>
<div class="code-block ng-tns-c3409981523-25 ng-animate-disabled ng-trigger ng-trigger-codeBlockRevealAnimation" data-hveid="0" data-ved="0CAAQhtANahcKEwjjjqvdpY2RAxUAAAAAHQAAAAAQYw">
<div class="code-block-decoration header-formatted gds-title-s ng-tns-c3409981523-25 ng-star-inserted"><span class="ng-tns-c3409981523-25">SQL</span>
<div class="buttons ng-tns-c3409981523-25 ng-star-inserted">&nbsp;</div>
</div>
<div class="formatted-code-block-internal-container ng-tns-c3409981523-25">
<div class="animated-opacity ng-tns-c3409981523-25">
<pre class="ng-tns-c3409981523-25"><code class="code-container formatted ng-tns-c3409981523-25" data-test-id="code-content"><span class="hljs-keyword">INSERT</span> <span class="hljs-keyword">INTO</span> "InvoiceLine" (...) <span class="hljs-keyword">VALUES</span> (..., <span class="hljs-number">0</span>) <span class="hljs-comment">-- Final line, write all cached lines + this line to QuickBooks</span>
</code></pre>
</div>
</div>
</div>
</li>
</ul>
<p>&nbsp;</p>
<div id="USE_CHAT_GPT_AI_ROOT_Clipboard" style="width: 1px; height: 1px; position: fixed; top: 0px; left: 0px; overflow: hidden; z-index: -1;" contenteditable="true">&nbsp;</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC] Not supported - At least one Line record is required. Please insert Child/Detail record(s) before inserting Parent/Header record.]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3101]]></link>
<guid isPermaLink="false"><![CDATA[62f91ce9b820a491ee78c108636db089]]></guid>
<pubDate><![CDATA[Wed, 22 Oct 2025 03:17:11 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
I am getting the following error trying to insert a record in Invoice: [QODBC] Not supported - At least one Line record is required. Please insert Child/Detail record(s) before inserting Parent/Header record.&nbsp;(#10074) 

&nbsp;...]]></description>
<content:encoded><![CDATA[<p><strong>Problem Description:</strong></p>
<p>I am getting the following error trying to insert a record in Invoice:<br /> <br />[QODBC] Not supported - At least one Line record is required. Please insert Child/Detail record(s) before inserting Parent/Header record.&nbsp;(#10074)<br /> <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/QODBCRequiresatleastonechild/Step1.png" alt="Step1" width="425" height="171" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Solution:</strong></p>
<p>How to Fix the Error<br />To resolve this issue, you must change the order of your data insertion or SQL statements to ensure the required detail exists before the header.</p>
<p>Insert the Detail Records First: Before you attempt to insert data into the Parent/Header table (e.g., Invoice), you must successfully insert at least one corresponding record into the Child/Detail/Line table (e.g., InvoiceLine).</p>
<p><br />INSERT INTO InvoiceLine (InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount, InvoiceLineSalesTaxCodeRefListID, FQSaveToCache) VALUES ( '320000-1071525597', 'POWERTRAK-2000', 200.00000, 200.00, '20000-999022286',1)<br /><br />INSERT INTO InvoiceLine (InvoiceLineDesc, FQSaveToCache) VALUES ('POWERTRAK-3000', 1)<br /><br />INSERT INTO InvoiceLine (InvoiceLineDesc, FQSaveToCache) VALUES ('POWERTRAK-4000', 0)</p>
<p>&nbsp;</p>
<p>Insert the header record:&nbsp;</p>
<p>INSERT INTO Invoice (CustomerRefListID, RefNumber, FQSaveToCache) VALUES ('670000-1071517519', '71099',0)</p>
<p>Insert the Header Record Last: Once the detail record(s) are in place, you can then insert the Parent/Header record, completing the transaction.</p>
<p><br /><br /> <br /><br />MS Access:</p>
<p>If you are using MS Access application, the connection string or the connection object is getting closed after you insert the Invoice Line and before you can insert the Invoice (Header) record.<br />This could be because your linked tables have different connection strings. You can delete the linked table and re-add the linked tables.</p>
<p>If you are using ADO/DOA objects, please ensure you do not close the connection between the insert of InvoiceLine and the Invoice table.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-ALL] &amp; [QXL- ALL] SQL Language Support (Syntax)]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3080]]></link>
<guid isPermaLink="false"><![CDATA[a9986cb066812f440bc2bb6e3c13696c]]></guid>
<pubDate><![CDATA[Thu, 30 Nov 2023 12:14:23 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[[QODBC-ALL] &amp; [QXL- ALL] SQL Language Support (Syntax)
Stored Procedures Command List
Applicable to&nbsp;[QODBC-Desktop], [QODBC-Online], [QODBC-POS], [QXL- Desktop] &amp;&nbsp;[QXL- Online]&nbsp;
&nbsp;
Stored Procedures
SP_COLUMNS&nbsp;table na...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">[QODBC-ALL] &amp; [QXL- ALL] SQL Language Support (Syntax)</span></h2>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Stored Procedures Command List</span></h2>
<p>Applicable to&nbsp;[QODBC-Desktop], [QODBC-Online], [QODBC-POS], [QXL- Desktop] &amp;&nbsp;[QXL- Online]&nbsp;</p>
<p>&nbsp;</p>
<h2 class="style6">Stored Procedures</h2>
<p><span class="style9">SP_COLUMNS</span>&nbsp;<em>table name</em></p>
<p><strong>Instruction: </strong>Returns a recordset of the columns in the specified table.</p>
<p><strong>Example:</strong> sp_columns Customer</p>
<p><strong>Returns: </strong></p>
<table border="1" width="1216" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style1">
<td valign="top" width="133"><span class="style10">QUALIFIERNAME </span></td>
<td valign="top" width="109">OWNER NAME</td>
<td valign="top" width="101">TABLE NAME</td>
<td valign="top" width="116"><span class="style10">COLUMNNAME </span></td>
<td valign="top" width="51"><span class="style10">TYPE </span></td>
<td valign="top" width="103">TYPE NAME</td>
<td valign="top" width="85"><span class="style10">PRECISION</span></td>
<td valign="top" width="83"><span class="style10">LENGTH </span></td>
<td valign="top" width="55"><span class="style10">SCALE </span></td>
<td valign="top" width="63"><span class="style10">RADIX </span></td>
<td valign="top" width="91"><span class="style10">NULLABLE </span></td>
<td valign="top" width="81"><span class="style10">REMARKS </span></td>
<td valign="top" width="78"><span class="style10">DEFAULT </span></td>
<td valign="top" width="37"><span class="style11">...</span></td>
</tr>
<tr>
<td valign="top" width="133">QODBC</td>
<td valign="top" width="109">&nbsp;</td>
<td valign="top" width="101">Customer</td>
<td valign="top" width="116">ListID</td>
<td valign="top" width="51">12</td>
<td valign="top" width="103">VARCHAR</td>
<td valign="top" width="85">36</td>
<td valign="top" width="83">36</td>
<td valign="top" width="55">0</td>
<td valign="top" width="63">&nbsp;</td>
<td valign="top" width="91">0</td>
<td valign="top" width="81">&nbsp;</td>
<td valign="top" width="78">NULL</td>
<td valign="top" width="37">...</td>
</tr>
<tr>
<td valign="top" width="133">QODBC</td>
<td valign="top" width="109">&nbsp;</td>
<td valign="top" width="101">Customer</td>
<td valign="top" width="116">TimeCreated</td>
<td valign="top" width="51">11</td>
<td valign="top" width="103">TIMESTAMP</td>
<td valign="top" width="85">23</td>
<td valign="top" width="83">10</td>
<td valign="top" width="55">0</td>
<td valign="top" width="63">&nbsp;</td>
<td valign="top" width="91">1</td>
<td valign="top" width="81">&nbsp;</td>
<td valign="top" width="78">NULL</td>
<td valign="top" width="37">...</td>
</tr>
<tr>
<td valign="top" width="133">&hellip;</td>
<td valign="top" width="109">&hellip;</td>
<td valign="top" width="101">&hellip;</td>
<td valign="top" width="116">&hellip;</td>
<td valign="top" width="51">&hellip;</td>
<td valign="top" width="103">&hellip;</td>
<td valign="top" width="85">...</td>
<td valign="top" width="83">...</td>
<td valign="top" width="55">...</td>
<td valign="top" width="63">...</td>
<td valign="top" width="91">...</td>
<td valign="top" width="81">...</td>
<td valign="top" width="78">...</td>
<td valign="top" width="37">...</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_FQSAVETOCACHEROLLBACK</strong></span> <em>on|off </em></p>
<p><strong>Instruction: </strong>Sets or clears whether the cache is backed up or reset if an error occurs when doing multiple inserts using the FQSaveToCache flag field. The off mode can help with performance if the rollback is not needed. The default is on.</p>
<p><strong>Example: </strong>sp_fqsavetocacherollback off</p>
<p><strong>Returns: </strong>This is an execute the command and does not return a recordset.</p>
<p>&nbsp;</p>
<p id="SP_LASTINSERTID"><span class="style9">SP_LASTINSERTID </span></p>
<p><strong>Instruction: </strong>Returns a recordset with one row (or multiple rows if done after a sp_batchupdate command) and two columns containing the last ListID or last TxnID from the last insert done and its error status on the current connection. The value is obtained from the return value of the previous insert (or inserts if done inside a sp_batchstart/sp_batchupdate block) performed on the same connection for that table.</p>
<p><strong>Example: </strong>sp_lastinsertid Customer</p>
<p><strong>Returns: </strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td width="138"><strong>LastInsertId </strong></td>
<td width="118"><strong>ErrorMessage </strong></td>
</tr>
<tr>
<td width="138">F3B0-1355557956</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_LASTINSERTIDRETURN</strong><strong>&nbsp;</strong></span> <em>on|off </em></p>
<p><strong>Instruction: </strong>Sets or clears whether the last insert ID is returned.</p>
<p><strong>Example: </strong>sp_lastinsertidreturn off</p>
<p><strong>Returns: </strong>This is an execute the command and does not return a recordset.</p>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_OPTIMIZEFULLSYNC</strong><strong>&nbsp;</strong></span> <em>tablename|ALL </em></p>
<p><strong>Instruction: </strong>This command will reload the specified table from scratch. It helps ensure that the optimizer perfectly syncs with the QuickBooks company file. The ALL option will do all tables.</p>
<p><strong>Example: </strong>sp_optimizefullsync Customer</p>
<p><strong>Returns: </strong>This is an execute the command and does not return a recordset.</p>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_OPTIMIZEUPDATESYNC&nbsp;</strong></span><em>tablename|ALL </em></p>
<p><strong>Instruction: </strong>This command will synchronize the specified table with the QuickBooks data file using changed and deleted data. It helps ensure that the optimizer is up to date with the QuickBooks company file. The ALL option will do all tables.</p>
<p><strong>Example: </strong>sp_optimizeupdatesync Customer</p>
<p><strong>Returns: </strong>This is an execute the command and does not return a recordset.</p>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_PRIMARYKEYS</strong></span><em>tablename </em></p>
<p><strong>Instruction: </strong>Returns a recordset of the primary key segments in the specified table.</p>
<p><strong>Example: </strong>sp_primarykeys Customer</p>
<p><strong>Returns: </strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="120"><strong>QUALIFIERNAME </strong></td>
<td valign="top" width="96"><strong>OWNER NAME</strong></td>
<td valign="top" width="96"><strong>TABLE NAME</strong></td>
<td valign="top" width="114"><strong>COLUMNNAME </strong></td>
<td valign="top" width="66"><strong>KEYSEQ </strong></td>
<td valign="top" width="139"><strong>PKNAME </strong></td>
</tr>
<tr>
<td valign="top" width="120">QODBC</td>
<td valign="top" width="96">&nbsp;</td>
<td valign="top" width="96">Customer</td>
<td valign="top" width="114">ListID</td>
<td valign="top" width="66">1</td>
<td valign="top" width="139">Customer_PrimaryKey</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>SP_QBFILENAME</strong></p>
<p><strong>Instruction: </strong>This command returns the full path to the open QuickBooks company file. It returns a one-column, one-row record set.</p>
<p><strong>Example: </strong>sp_qbfilename</p>
<p><strong>Returns: </strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="style10" valign="top" width="631"><strong>QBFileName </strong></td>
</tr>
<tr>
<td valign="top" width="631">C:\Documents and Settings\All Users\Documents\Intuit\QuickBooks\Test Company Files\Medal Crest Homes, LLC.QBW</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>*Note: sp_report and other report commands are unavailable for QODBC POS. QuickBooks POS SDK does not support reports, and thus it is not available in QODBC POS.</p>
<p><span class="style9"><strong>SP_REPORT</strong></span><em>tablename </em> [show]</p>
<p><strong>Instruction: </strong>Similar to the SQL Keyword SELECT. Used to run built-in QuickBooks reports. See <a href="http://www.qodbc.com/data">http://www.qodbc.com/data</a>, make your country selection, then select the REPORTS link.</p>
<p><strong>Example: </strong>sp_report ARAgingSummary show Current_Title, Amount_Title, Text, Label, Current, Amount parameters DateMacro = &lsquo;Today', AgingAsOf = &lsquo;Today'</p>
<p><strong>Returns: </strong></p>
<table border="1" width="1637" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td width="92" height="21"><strong>Current_Title </strong></td>
<td width="122"><strong>Amount_1_Title </strong></td>
<td width="116"><strong>Amount_2_Title </strong></td>
<td width="115"><strong>Amount_3_Title </strong></td>
<td width="111"><strong>Amount_4_Title </strong></td>
<td width="113"><strong>Amount_5_Title </strong></td>
<td width="333"><strong>Label </strong></td>
<td width="68"><strong>Current </strong></td>
<td width="112"><strong>Amount_Count </strong></td>
<td width="81"><strong>Amount_1 </strong></td>
<td width="86"><strong>Amount_2</strong></td>
<td width="89"><strong>Amount_3</strong></td>
<td width="90"><strong>Amount_4</strong></td>
<td width="79"><strong>Amount_5</strong></td>
</tr>
<tr>
<td>Current</td>
<td>1 &ndash; 30</td>
<td>31 &ndash; 60</td>
<td>61 &ndash; 90</td>
<td>&gt;90</td>
<td>TOTAL</td>
<td>1456 Red Cloud Peak - Barbour</td>
<td>0.00</td>
<td>5</td>
<td>0.00</td>
<td>0.00</td>
<td>0.00</td>
<td>25671.35</td>
<td>25671.35</td>
</tr>
<tr>
<td>Current</td>
<td>1 &ndash; 30</td>
<td>31 &ndash; 60</td>
<td>61 &ndash; 90</td>
<td>&gt;90</td>
<td>TOTAL</td>
<td>1463 Red Cloud Peak - MCH</td>
<td>0.00</td>
<td>5</td>
<td>0.00</td>
<td>0.00</td>
<td>0.00</td>
<td>29353.00</td>
<td>29353.00</td>
</tr>
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_REPORTS </strong></span></p>
<p><strong>Instruction: </strong>Returns a recordset of the information of all reports.</p>
<p><strong>Example: </strong>sp_reports <strong>&nbsp;</strong></p>
<p><strong>Returns: </strong></p>
<table border="1" width="809" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="123"><strong>QUALIFIERNAME </strong></td>
<td valign="top" width="101"><strong>OWNER NAME</strong></td>
<td valign="top" width="111"><strong>TABLE NAME</strong></td>
<td valign="top" width="86"><strong>TYPE NAME</strong></td>
<td valign="top" width="376"><strong>REMARKS </strong></td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="111">APAgingDetail</td>
<td valign="top" width="86">SP_REPORT</td>
<td valign="top">Vendors &amp; Payables-&gt;A/P Aging Detail</td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="111">APAgingSummary</td>
<td valign="top" width="86">SP_REPORT</td>
<td valign="top">Vendors &amp; Payables-&gt;A/P Aging Summary</td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="111">ARAgingDetail</td>
<td valign="top" width="86">SP_REPORT</td>
<td valign="top">Customers &amp; Receivables-&gt;A/R Aging Detail</td>
</tr>
<tr>
<td valign="top" width="123">&hellip;</td>
<td valign="top" width="101">&hellip;</td>
<td valign="top" width="111">&hellip;</td>
<td valign="top" width="86">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_SPECIALCOLUMNS</strong><strong>&nbsp;</strong></span> <em>tablename </em> [ <em>ROWVER </em>]|[ <em>BEST_ROWID </em>]</p>
<p><strong>Instruction: </strong>Returns a recordset of the special columns. RowVer describes which column holds the row ID, and Best_RowID describes the column that is the row identifier. Best_RowID is the default if neither is specified.</p>
<p><strong>Example: </strong>sp_specialcolumns Customer Best_RowID</p>
<p><strong>Returns: </strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="61"><strong>SCOPE </strong></td>
<td valign="top" width="113"><strong>COLUMNNAME </strong></td>
<td valign="top" width="60"><strong>TYPE </strong></td>
<td valign="top" width="110"><strong>TYPE NAME</strong></td>
<td valign="top" width="88"><strong>PRECISION </strong></td>
<td valign="top" width="69"><strong>LENGTH </strong></td>
<td valign="top" width="60"><strong>SCALE </strong></td>
<td valign="top" width="71"><strong>PSEUDO </strong></td>
</tr>
<tr>
<td valign="top" width="61">2</td>
<td valign="top" width="113">ListID</td>
<td valign="top" width="60">12</td>
<td valign="top" width="110">VARCHAR</td>
<td valign="top" width="88">36</td>
<td valign="top" width="69">36</td>
<td valign="top" width="60">0</td>
<td valign="top" width="71">0</td>
</tr>
</tbody>
</table>
<p><strong>Example2: </strong>sp_specialcolumns Customer RowVer <strong>&nbsp;</strong></p>
<p><strong>Returns: </strong><strong>&nbsp;</strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="66"><strong>SCOPE </strong></td>
<td valign="top" width="120"><strong>COLUMNNAME </strong></td>
<td valign="top" width="61"><strong>TYPE </strong></td>
<td valign="top" width="97"><strong>TYPE NAME</strong></td>
<td valign="top" width="88"><strong>PRECISION </strong></td>
<td valign="top" width="69"><strong>LENGTH </strong></td>
<td valign="top" width="60"><strong>SCALE </strong></td>
<td valign="top" width="71"><strong>PSEUDO </strong></td>
</tr>
<tr>
<td valign="top" width="66">2</td>
<td valign="top" width="120">EditSequence</td>
<td valign="top" width="61">12</td>
<td valign="top" width="97">VARCHAR</td>
<td valign="top" width="88">16</td>
<td valign="top" width="69">16</td>
<td valign="top" width="60">0</td>
<td valign="top" width="71">0</td>
</tr>
</tbody>
</table>
<p class="style1"><strong>&nbsp;</strong></p>
<p><span class="style9"><strong>SP_TABLES</strong><strong>&nbsp;</strong></span>&nbsp;<em>table name</em></p>
<p><strong>Instruction: </strong>Returns a recordset with the list of tables available from the ODBC Driver.</p>
<p><strong>Example: </strong>sp_tables</p>
<p><strong>Returns: </strong></p>
<table border="1" width="880" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="129"><strong>QUALIFIERNAME </strong></td>
<td valign="top" width="106"><strong>OWNER NAME</strong></td>
<td valign="top" width="127"><strong>TABLE NAME</strong></td>
<td valign="top" width="96"><strong>TYPE NAME</strong></td>
<td valign="top" width="109"><strong>REMARKS </strong></td>
<td valign="top" width="108">DELETEABLE</td>
<td valign="top" width="82"><strong>VOIDABLE </strong></td>
<td valign="top" width="105"><strong>INSERT_ONLY </strong></td>
</tr>
<tr>
<td valign="top" width="129">QODBC</td>
<td valign="top" width="106">&nbsp;</td>
<td valign="top" width="127">Account</td>
<td valign="top" width="96">TABLE</td>
<td valign="top" width="109">Chart of</td>
<td valign="top" width="108">1</td>
<td valign="top" width="82">0</td>
<td valign="top" width="105">0</td>
</tr>
<tr>
<td valign="top" width="129">QODBC</td>
<td valign="top" width="106">&nbsp;</td>
<td valign="top" width="127">AccountTaxLineInfo</td>
<td valign="top" width="96">TABLE</td>
<td valign="top" width="109">Account Tax</td>
<td valign="top" width="108">0</td>
<td valign="top" width="82">0</td>
<td valign="top" width="105">0</td>
</tr>
<tr>
<td valign="top" width="129">&hellip;</td>
<td valign="top" width="106">&hellip;</td>
<td valign="top" width="127">&hellip;</td>
<td valign="top" width="96">&hellip;</td>
<td valign="top" width="109">&hellip;</td>
<td valign="top" width="108">&nbsp;</td>
<td valign="top" width="82">&nbsp;</td>
<td valign="top" width="105">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_CATEGORIES </strong></span></p>
<p><strong>Instruction: </strong>Returns a recordset with the list of categories for all the tables.</p>
<p><strong>Example: </strong>sp_categories</p>
<p><strong>Returns: </strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="style10" valign="top" width="261"><strong>CATEGORY NAME</strong></td>
</tr>
<tr>
<td valign="top" width="261">Accounting &amp; Taxes</td>
</tr>
<tr>
<td valign="top" width="261">Banking</td>
</tr>
<tr>
<td valign="top" width="261">Budgets</td>
</tr>
<tr>
<td valign="top" width="261">Company &amp; Financial</td>
</tr>
<tr>
<td valign="top" width="261">Customers &amp; Receivables</td>
</tr>
<tr>
<td valign="top" width="261">Employees &amp; Payroll</td>
</tr>
<tr>
<td valign="top" width="261">Inventory</td>
</tr>
<tr>
<td valign="top" width="261">&hellip;.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_CATEGORYTABLES </strong></span></p>
<p><strong>Instruction: </strong>Returns a recordset with the list of all the tables and the categories they belong to.</p>
<p><strong>Example: </strong>sp_categorytables</p>
<p><strong>Returns: </strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="171"><strong>CATEGORY NAME</strong></td>
<td valign="top" width="213"><strong>TABLE NAME</strong></td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">Account</td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">AccountTaxLineInfo</td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">Class</td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">journal entry</td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">JournalEntryCreditLine</td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">JournalEntryDebitLine</td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">JournalEntryLine</td>
</tr>
<tr>
<td valign="top" width="171">Accounting &amp; Taxes</td>
<td valign="top" width="213">SpecialAccount</td>
</tr>
<tr>
<td valign="top" width="171">Banking</td>
<td valign="top" width="213">ReceivePaymentToDeposit</td>
</tr>
<tr>
<td valign="top" width="171">Banking</td>
<td valign="top" width="213">SalesTaxPaymentCheck</td>
</tr>
<tr>
<td valign="top" width="171">&hellip;</td>
<td valign="top" width="213">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_CATEGORYREPORTS </strong></span></p>
<p><strong>Instruction: </strong>Returns a recordset with the list of all the reports and the categories they belong to.</p>
<p><strong>Example: </strong>sp_categoryreports</p>
<p><strong>Returns: </strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="147"><strong>CATEGORY NAME</strong></td>
<td valign="top" width="147"><strong>REPORT NAME</strong></td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">AuditTrail</td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">GeneralLedger</td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">IncomeTaxDetail</td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">Journal</td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">TxnDetailByAccount</td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">TxnListByDate</td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">IncomeTaxSummary</td>
</tr>
<tr>
<td valign="top" width="147">Accounting &amp; Taxes</td>
<td valign="top" width="147">trial balance</td>
</tr>
<tr>
<td valign="top" width="147">Banking</td>
<td valign="top" width="147">check details</td>
</tr>
<tr>
<td valign="top" width="147">Banking</td>
<td valign="top" width="147">DepositDetail</td>
</tr>
<tr>
<td valign="top" width="147">&hellip;</td>
<td valign="top" width="147">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong class="style9">SP_FOREIGNKEYS</strong><strong>&nbsp;</strong></span>&nbsp;table name<em>&nbsp;table name</em></p>
<p><strong>Instruction: </strong>Returns a recordset of the detailed relationship information of two tables.</p>
<p><strong>Example: </strong>sp_foreignkeys Customer Invoice</p>
<p><strong>Returns: </strong></p>
<table border="1" width="1783" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="149"><strong>PKQUALIFIERNAME </strong></td>
<td valign="top" width="134"><strong>PKOWNERNAME </strong></td>
<td valign="top" width="117"><strong>PKTABLENAME </strong></td>
<td valign="top" width="131"><strong>PKCOLUMNNAME </strong></td>
<td valign="top" width="145"><strong>FKQUALIFIERNAME</strong></td>
<td valign="top" width="125"><strong>FKOWNERNAME </strong></td>
<td valign="top" width="117"><strong>FKTABLENAME </strong></td>
<td valign="top" width="133"><strong>FKCOLUMNNAME </strong></td>
<td valign="top" width="77"><strong>KEYSEQ </strong></td>
<td valign="top" width="103"><strong>UPDATE RULE</strong></td>
<td valign="top" width="100"><strong>DELETE RULE</strong></td>
<td valign="top" width="152"><strong>FKNAME </strong></td>
<td valign="top" width="142"><strong>PKNAME </strong></td>
<td valign="top" width="128"><strong>SEVERABILITY </strong></td>
</tr>
<tr>
<td valign="top" width="149">QODBC</td>
<td valign="top" width="134">&nbsp;</td>
<td valign="top" width="117">customer</td>
<td valign="top" width="131">ListID</td>
<td valign="top" width="145">QODBC</td>
<td valign="top" width="125">&nbsp;</td>
<td valign="top" width="117">Invoice</td>
<td valign="top" width="133">CustomerRefListID</td>
<td valign="top" width="77">1</td>
<td valign="top" width="103">3</td>
<td valign="top" width="100">3</td>
<td valign="top" width="152">Invoice_Customer_Link</td>
<td valign="top" width="142">Customer_PrimaryKey</td>
<td valign="top" width="128">7</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_PARAMETERS </strong></span></p>
<p><strong>Instruction: </strong>Returns a recordset with the list of the detailed information of parameters of each report.</p>
<p><strong>Example: </strong>sp_parameters</p>
<p><strong>Returns: </strong></p>
<table border="1" width="1995" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="123"><strong>QUALIFIERNAME </strong></td>
<td valign="top" width="101"><strong>OWNER NAME</strong></td>
<td valign="top" width="94"><strong>TABLE NAME</strong></td>
<td valign="top" width="138"><strong>PARAMETER NAME</strong></td>
<td valign="top" width="75"><strong>TYPE </strong></td>
<td valign="top" width="106"><strong>TYPE NAME</strong></td>
<td valign="top" width="106"><strong>PRECISION </strong></td>
<td valign="top" width="105"><strong>LENGTH </strong></td>
<td valign="top" width="106"><strong>DEFAULT </strong></td>
<td valign="top" width="106"><strong>DATATYPE </strong></td>
<td valign="top" width="156"><strong>DATETIME_SUBTYPE </strong></td>
<td valign="top" width="167"><strong>VALUES </strong></td>
<td valign="top" width="100"><strong>VALUE_TYPE </strong></td>
<td valign="top" width="119"><strong>LOOKUP_VALUE </strong></td>
<td valign="top" width="49"><strong>LOOKUP_DISPAY_FILED </strong></td>
<td valign="top" width="102"><strong>DEFAULT_VALUE </strong></td>
<td valign="top" width="102"><strong>REMARKS </strong></td>
<td valign="top" width="102"><strong>ADVANCED </strong></td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="94">APAgingDetail</td>
<td valign="top" width="138">DateFrom</td>
<td valign="top" width="75">9</td>
<td valign="top" width="106">DATE</td>
<td valign="top" width="106">10</td>
<td valign="top" width="105">6</td>
<td valign="top" width="106">&nbsp;</td>
<td valign="top" width="106">9</td>
<td valign="top" width="156">1</td>
<td valign="top" width="167">{d'yyyy-mm-dd'}</td>
<td valign="top" width="100">Date</td>
<td valign="top" width="119">&nbsp;</td>
<td valign="top" width="49">&nbsp;</td>
<td valign="top" width="102">&nbsp;</td>
<td valign="top" width="102">DateFrom</td>
<td valign="top" width="102">0</td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="94">APAgingDetail</td>
<td valign="top" width="138">DateTo</td>
<td valign="top" width="75">9</td>
<td valign="top" width="106">DATE</td>
<td valign="top" width="106">10</td>
<td valign="top" width="105">6</td>
<td valign="top" width="106">&nbsp;</td>
<td valign="top" width="106">9</td>
<td valign="top" width="156">1</td>
<td valign="top" width="167">{d'yyyy-mm-dd'}</td>
<td valign="top" width="100">Date</td>
<td valign="top" width="119">&nbsp;</td>
<td valign="top" width="49">&nbsp;</td>
<td valign="top" width="102">&nbsp;</td>
<td valign="top" width="102">DateTo</td>
<td valign="top" width="102">0</td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="94">APAgingDetail</td>
<td valign="top" width="138">DateMacro</td>
<td valign="top" width="75">12</td>
<td valign="top" width="106">VARCHAR</td>
<td valign="top" width="106">4096</td>
<td valign="top" width="105">4096</td>
<td valign="top" width="106">&nbsp;</td>
<td valign="top" width="106">12</td>
<td valign="top" width="156">&nbsp;</td>
<td valign="top" width="167">|All|Today|ThisWeek|This&hellip;.</td>
<td valign="top" width="100">FixedList</td>
<td valign="top" width="119">&nbsp;</td>
<td valign="top" width="49">&nbsp;</td>
<td valign="top" width="102">&nbsp;</td>
<td valign="top" width="102">DateMacro</td>
<td valign="top" width="102">0</td>
</tr>
<tr>
<td valign="top" width="123">&hellip;</td>
<td valign="top" width="101">&hellip;</td>
<td valign="top" width="94">&hellip;.</td>
<td valign="top" width="138">&hellip;</td>
<td valign="top" width="75">&hellip;</td>
<td valign="top" width="106">&hellip;</td>
<td valign="top" width="106">&hellip;</td>
<td valign="top" width="105">&hellip;</td>
<td valign="top" width="106">&hellip;</td>
<td valign="top" width="106">&hellip;</td>
<td valign="top" width="156">&hellip;</td>
<td valign="top" width="167">&hellip;</td>
<td valign="top" width="100">&hellip;</td>
<td valign="top" width="119">&hellip;</td>
<td valign="top" width="49">&hellip;</td>
<td valign="top" width="102">&hellip;</td>
<td valign="top" width="102">&hellip;</td>
<td valign="top" width="102">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><span class="style9"><strong>SP_STATISTICS</strong><strong>&nbsp;</strong></span> <em>tablename </em></p>
<p><strong>Instruction: </strong>Returns a recordset with the list of all the indexes and a list of statistical information of the specified table or indexed view.</p>
<p><strong>Example: </strong>sp_statistics Customer</p>
<p><strong>Returns: </strong></p>
<table border="1" width="1322" cellspacing="0" cellpadding="0">
<tbody>
<tr class="style10">
<td valign="top" width="123"><strong>QUALIFIERNAME </strong></td>
<td valign="top" width="101"><strong>OWNER NAME</strong></td>
<td valign="top" width="94"><strong>TABLE NAME</strong></td>
<td valign="top" width="91"><strong>NONUNIQUE </strong></td>
<td valign="top" width="163"><strong>INDEXQUALIFIERNAME</strong></td>
<td valign="top" width="163"><strong>INDEXNAME </strong></td>
<td valign="top" width="50"><strong>TYPE </strong></td>
<td valign="top" width="96"><strong>SEQININDEX </strong></td>
<td valign="top" width="108"><strong>COLUMNNAME </strong></td>
<td valign="top" width="86"><strong>COLLATION </strong></td>
<td valign="top" width="100"><strong>CARDINALITY </strong></td>
<td valign="top" width="64"><strong>PAGES </strong></td>
<td valign="top" width="55"><strong>FILTER </strong></td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="94">Customer</td>
<td valign="top" width="91">0</td>
<td valign="top" width="163">&nbsp;</td>
<td valign="top" width="163">Customer_PrimaryKey</td>
<td valign="top" width="50">3</td>
<td valign="top" width="96">1</td>
<td valign="top" width="108">ListID</td>
<td valign="top" width="86">A</td>
<td valign="top" width="100">&nbsp;</td>
<td valign="top" width="64">&nbsp;</td>
<td valign="top" width="55">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="123">QODBC</td>
<td valign="top" width="101">&nbsp;</td>
<td valign="top" width="94">Customer</td>
<td valign="top" width="91">1</td>
<td valign="top" width="163">&nbsp;</td>
<td valign="top" width="163">Customer_TimeModified</td>
<td valign="top" width="50">3</td>
<td valign="top" width="96">1</td>
<td valign="top" width="108">TimeModified</td>
<td valign="top" width="86">A</td>
<td valign="top" width="100">&nbsp;</td>
<td valign="top" width="64">&nbsp;</td>
<td valign="top" width="55">&nbsp;</td>
</tr>
<tr>
<td valign="top" width="123">&hellip;</td>
<td valign="top" width="101">&hellip;</td>
<td valign="top" width="94">&hellip;</td>
<td valign="top" width="91">&hellip;</td>
<td valign="top" width="163">&hellip;</td>
<td valign="top" width="163">&hellip;</td>
<td valign="top" width="50">&hellip;</td>
<td valign="top" width="96">&hellip;</td>
<td valign="top" width="108">&hellip;</td>
<td valign="top" width="86">&hellip;</td>
<td valign="top" width="100">&hellip;</td>
<td valign="top" width="64">&hellip;</td>
<td valign="top" width="55">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Keywords:&nbsp;last insert id</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Function List</span></h2>
<p>Applicable to&nbsp;[QODBC-Desktop], [QODBC-Online], [QODBC-POS], [QXL- Desktop] &amp;&nbsp;[QXL- Online]&nbsp;</p>
<p>&nbsp;</p>
<h2 class="style6">Functions</h2>
<p class="style7">&nbsp;&nbsp;&nbsp;&nbsp; This is a list of all of the SQL functions supported by the QODBC Driver and their associated syntax.</p>
<h3 class="style8">QODBC String Functions</h3>
<p class="style9"><strong>ASCII </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the ASCII code value of the leftmost character of <em>string_exp </em> as an integer.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn ASCII("Name")} AS "ASCII", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="278">
<tbody>
<tr class="style7">
<td width="97"><span class="style11">ASCII</span></td>
<td width="158"><span class="style11">Name</span></td>
</tr>
<tr class="style7">
<td>65</td>
<td>Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td>65</td>
<td>Andres, Cristina</td>
</tr>
<tr class="style7">
<td>66</td>
<td>Balak, Mike</td>
</tr>
<tr class="style7">
<td>51</td>
<td>330 Main St</td>
</tr>
<tr class="style7">
<td>82</td>
<td>Residential</td>
</tr>
<tr class="style7">
<td>66</td>
<td>Blackwell, Edward</td>
</tr>
<tr class="style7">
<td>67</td>
<td>Chapman, Natalie</td>
</tr>
<tr class="style7">
<td>67</td>
<td>Cheknis, Benjamin</td>
</tr>
<tr class="style7">
<td>67</td>
<td>Corcoran, Carol</td>
</tr>
<tr class="style7">
<td>&hellip;</td>
<td>&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>CHAR </strong>( <em>code </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the character with the ASCII code value specified by the code. The code value<em>&nbsp;</em>should be between 0 and 255; otherwise, the return value is data source-dependent.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CHAR(65)} +&nbsp; {fn CHAR(66)} AS "APlusB", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="278">
<tbody>
<tr class="style7">
<td width="106"><strong>APlusB </strong></td>
<td width="156"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td>AB</td>
<td>Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td>AB</td>
<td>Andres, Cristina</td>
</tr>
<tr class="style7">
<td>AB</td>
<td>Balak, Mike</td>
</tr>
<tr class="style7">
<td>AB</td>
<td>330 Main St</td>
</tr>
<tr class="style7">
<td>AB</td>
<td>Residential</td>
</tr>
<tr class="style7">
<td>&hellip;</td>
<td>&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>CONCAT </strong>( <em>string_exp1, string_exp2 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns a character string that results from concatenating <em>string_exp2 </em> to string_exp1. A NULL value will be returned if the column represented by <em>string_exp1 </em> or <em>string_exp2 </em> contains a NULL value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CONCAT("BillAddressState", "BillAddressPostalCode")} AS "STZip", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="276">
<tbody>
<tr class="style7">
<td valign="top"><strong>STZip </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">CA94555</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">CA94326</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">CA94326</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">CA94326</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">CA94326</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong></p>
<p class="style9"><strong>DIFFERENCE </strong>( <em>string_exp1, string_exp2 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns an integer value that indicates the difference between the values returned by the SOUNDEX function for <em>string_exp1 </em> and <em>string_exp2. </em></p>
<p class="style7"><strong>Example: </strong>SELECT {fn DIFFERENCE("Name", 'Abercrombie, Kristy')} AS "Difference", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="304">
<tbody>
<tr class="style7">
<td valign="top"><span class="style11">Difference </span></td>
<td valign="top"><span class="style11">Name </span></td>
</tr>
<tr class="style7">
<td valign="top"><span class="style12">199949 </span></td>
<td valign="top"><span class="style12">Adam's Candy Shop </span></td>
</tr>
<tr class="style7">
<td valign="top"><span class="style12">1102999 </span></td>
<td valign="top"><span class="style12">Andres, Cristina </span></td>
</tr>
<tr class="style7">
<td valign="top"><span class="style12">9910829 </span></td>
<td valign="top"><span class="style12">Balak, Mike </span></td>
</tr>
<tr class="style7">
<td valign="top"><span class="style12">1099949 </span></td>
<td valign="top"><span class="style12">330 Main St </span></td>
</tr>
<tr class="style7">
<td valign="top"><span class="style12">169901831 </span></td>
<td valign="top"><span class="style12">Residential </span></td>
</tr>
<tr class="style7">
<td valign="top"><span class="style12">&hellip; </span></td>
<td valign="top"><span class="style12">&hellip; </span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>INSERT </strong>( <em>string_exp1, start, length, string_exp2 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns a character string where <em>length </em>characters have been deleted from the <em>string_exp1 </em> beginning at the <em>start&nbsp;</em>and where <em>string_exp2 </em> has been inserted into string_exp1, beginning at the start.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn INSERT("Name", 3, 2, '*Inserted*')} AS "Inserted", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="420">
<tbody>
<tr class="style7">
<td valign="top"><strong>Inserted </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">Ad*Inserted*'s Candy Shop</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">An*Inserted*es, Cristina</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Ba*Inserted*k, Mike</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">33*Inserted* Main St</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">Re*Inserted*dential</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>LCASE </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Converts all uppercase characters in <em>string_exp </em> to lowercase.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn LCASE("Name")} AS "LCase", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="449">
<tbody>
<tr class="style7">
<td valign="top"><strong>LCase </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">adam's candy shop</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Balak, mike</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">330 main st</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">residential</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>UCASE </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Converts all lowercase characters in <em>string_exp </em> to uppercase.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn UCASE("Name")} AS "UCase", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="422">
<tbody>
<tr class="style7">
<td valign="top"><strong>UCase </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">ADAM'S CANDY SHOP</td>
<td valign="top">Adam's Candy</td>
</tr>
<tr class="style7">
<td valign="top">ANDRES, CRISTINA</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">BALAK, MIKE</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">330 MAIN ST</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">RESIDENTIAL</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>LEFT </strong>( <em>string_exp, count </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the leftmost count of characters of <em>string_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn LEFT("Name", 5)} AS "Left5", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="299">
<tbody>
<tr class="style7">
<td valign="top"><strong>Left5 </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam'</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">Andre</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Balak</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">330 M</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">Resid</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>RIGHT </strong>( <em>string_exp, count </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the rightmost <em>count&nbsp;</em>of characters of <em>string_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn RIGHT(&ldquo;Name&rdquo;, 5)} AS "Right5", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="299">
<tbody>
<tr class="style7">
<td valign="top"><strong>Right5 </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">Shop</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">Stina</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Mike</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">In St</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">ntial</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>LENGTH </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the number of characters in <em>string_exp</em>, excluding trailing blanks and the string termination character.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn LENGTH("Name")} AS "Length", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="299">
<tbody>
<tr class="style7">
<td valign="top"><strong>Length </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">17</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">16</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>BIT_LENGTH </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the bit length of <em>string_exp</em>, excluding trailing blanks and the string termination character.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn BIT_LENGTH("Name")} AS "BitLength", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="300">
<tbody>
<tr class="style7">
<td valign="top"><strong>BitLength </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">136</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">128</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">88</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">88</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">88</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CHAR_LENGTH </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the number of chars in <em>string_exp</em>, excluding trailing blanks and the string termination character.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CHAR_LENGTH("Name")} AS "CharLength", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>CharLength </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">17</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">16</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CHARACTER_LENGTH </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the number of characters in <em>string_exp</em>, excluding trailing blanks and the string termination character. (Almost the same as the LENGTH function)</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CHARACTER_LENGTH("Name")} AS "CharacterLength", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>CharacterLength </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">17</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">16</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>OCTET_LENGTH </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the octet length of <em>string_exp</em>, excluding trailing blanks and the string termination character. (Almost the same as the LENGTH function)</p>
<p class="style7"><strong>Example: </strong>SELECT {fn OCTET_LENGTH("Name")} AS "OctetLength", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>OctetLength </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">17</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">16</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">11</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>LOCATE </strong>( <em>string_exp1, string_exp2[, start] </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the starting position of the first occurrence of <em>string_exp1 </em> within <em>string_exp2</em>. The search for the first occurrence of <em>string_exp1 </em> begins with the first position in <em>string_exp2 </em> unless the optional argument is specified. If the&nbsp;<em>start&nbsp;</em>is set, the search begins with the character position indicated by the value birth. The first character position in <em>string_exp2 </em> is indicated by the value 1. If <em>string_exp1 </em> is not found within <em>string_exp2</em>, the value 0 is returned.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn LOCATE('a', "Name", 2)} AS "LocationOfA", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>location of</strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">3</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">16</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">2</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">6</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">10</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>LTRIM </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the characters of <em>string_exp</em>, with leading blanks removed.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn LTRIM("Name")} AS "LTrim", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>LTrim </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>RTRIM </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the characters of <em>string_exp</em>, with trailing blanks removed.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn RTRIM("Name")} AS "RTrim", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>trim </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy Shop</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>REPEAT </strong>( <em>string_exp1, repeat times&nbsp;</em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the characters of string_exp1, repeating it repeat times.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn REPEAT("Name",2)} as "Repeat2","Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="470">
<tbody>
<tr class="style7">
<td valign="top"><strong>Repeat2 </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy Shop Adam's Candy Shop</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina Andres, Cristina</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike Balak, Mike</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St330 Main St</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">Residential Residential</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>POSITION </strong>( <em>string_exp1, string_exp2 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns an integer value that shows the position where <em>string_exp1 </em> first begins in <em>string_exp2 </em>(including spaces)</p>
<p class="style7"><strong>Example: </strong>SELECT {fn POSITION('a' IN "Name")} As "PositionOfA", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="467">
<tbody>
<tr class="style7">
<td valign="top"><strong>PositionOfA </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">1</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">1</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">2</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">0</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">0</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>REPLACE </strong>( <em>string_exp1, string_exp2,string_exp3 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the characters of <em>string_exp3,&nbsp;</em>which takes the place of <em>string_exp2 </em> value in column <em>string_exp1</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn REPLACE("NAME",'330 Main St','abc')} AS "Replace","Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="471">
<tbody>
<tr class="style7">
<td valign="top"><strong>Replace </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy Shop</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">abc</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>SOUNDEX </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns a character string representing the sound of the words in <em>string_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn SOUNDEX("Name")} AS "Soundex", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="384">
<tbody>
<tr class="style7">
<td valign="top"><strong>Soundex </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">ADAMACACAMDACAB</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">AMDRACACRACDAMA</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">BALACAMACA</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">AMAMACD</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">RACADAMDAL</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>SPACE </strong>( <em>count </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns a character string consisting of <em>count</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>spaces.</p>
<p class="style7"><strong>Example:&nbsp;</strong>SELECT '[' + {fn SPACE(10)} + ']' AS "TenSpaces", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>TenSpaces </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">[ ]</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">[ ]</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">[ ]</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">[ ]</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">[ ]</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>SUBSTRING </strong>( <em>string_exp, start, length </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns a character string that is derived from <em>string_exp </em> beginning at the character position specified by <em>start</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>for <em>length</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>characters.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn SUBSTRING("Name", 2, 5)} AS "Middle5Characters", "Name" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="324">
<tbody>
<tr class="style7">
<td valign="top"><strong>Middle5Characters </strong></td>
<td valign="top"><strong>Name </strong></td>
</tr>
<tr class="style7">
<td valign="top">dam's</td>
<td valign="top">Adam's Candy Shop</td>
</tr>
<tr class="style7">
<td valign="top">ndres</td>
<td valign="top">Andres, Cristina</td>
</tr>
<tr class="style7">
<td valign="top">alak,</td>
<td valign="top">Balak, Mike</td>
</tr>
<tr class="style7">
<td valign="top">30 Ma</td>
<td valign="top">330 Main St</td>
</tr>
<tr class="style7">
<td valign="top">eside</td>
<td valign="top">Residential</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>&nbsp; </strong></p>
<h3 class="style8"><strong>QODBC Numeric Functions </strong></h3>
<p class="style9"><strong>ABS </strong>( <em>numeric_exp|float_exp|integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the absolute value of <em>numeric_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT "Name", {fn ABS(Balance)} AS "ABSBalance", "Balance" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="471">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>ABSBalance </strong></td>
<td valign="top"><strong>Balance </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy</td>
<td valign="top">40.00</td>
<td valign="top">40.00</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">180.00</td>
<td valign="top">180.00</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>ACOS </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the arccosine of <em>float_exp </em> as an angle, expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn ACOS({fn CONVERT(0, SQL_FLOAT)})} AS "ACOSValue", CompanyName AS "CompanyName" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>ACOSValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">1.570796</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>ASIN </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the arcsine of <em>float_exp </em> as an angle, expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn ASIN({fn CONVERT(0, SQL_FLOAT)})} AS "ASINValue", CompanyName AS "CompanyName" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>ASINValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">1.570796</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>ATAN </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the arctangent of <em>float_exp </em> as an angle, expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn ATAN({fn CONVERT(1, SQL_FLOAT)})} AS "ATANValue", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>ATANValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">0.785398</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>ATAN2 </strong>( <em>float_exp1, float_exp2 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the arctangent of the x and y coordinates specified by <em>float_exp1 </em> and <em>float_exp2</em>, respectively, as an angle, expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn ATAN2({fn CONVERT(1, SQL_FLOAT)}, {fn CONVERT(2, SQL_FLOAT)})} AS "ATAN2Value", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>ATAN2Value </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">0.463648</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>COS </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the cosine of <em>float_exp, </em>where <em>float_exp </em> is an angle expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn COS({fn CONVERT(1, SQL_FLOAT)})} AS "COSValue", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>COSValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">0.540302</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>COT </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the cotangent of <em>float_exp, </em>where <em>float_exp </em> is an angle expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn COT({fn CONVERT(1, SQL_FLOAT)})} AS "COTValue", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>COTValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">0.642093</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>CEILING </strong>( <em>numeric_exp|float_exp|integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the smallest integer greater than or equal to <em>numeric_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT "Name", {fn CEILING("Balance")} AS "CeilingBalance", "Balance" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="471">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>CeilingBalance </strong></td>
<td valign="top"><strong>Balance </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy</td>
<td valign="top">40.00</td>
<td valign="top">40.00</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">180.00</td>
<td valign="top">180.00</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>DEGREES </strong>( <em>numeric_exp|float_exp|integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the number of degrees converted from <em>numeric_exp </em> radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn DEGREES(1)} AS "DegreesReturned", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>DegreesReturned </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">57.29578</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>EXP </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the exponential value of <em>float_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn EXP({fn CONVERT(1, SQL_FLOAT)})} AS "ExpReturned", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>ExpReturned </strong></td>
<td valign="top"><strong>ExpReturned </strong></td>
</tr>
<tr class="style7">
<td valign="top">2.718282</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>FLOOR </strong>(numeric_exp|float_exp|integer_exp)</p>
<p class="style7"><strong>Instruction: </strong>Returns the largest integer less than or equal to <em>numeric_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT "Name", {fn FLOOR("Balance")} AS "FloorBalance", "Balance" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="471">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>FloorBalance </strong></td>
<td valign="top"><strong>Balance </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy</td>
<td valign="top">40.00</td>
<td valign="top">40.00</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">0.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">180.00</td>
<td valign="top">180.00</td>
</tr>
<tr class="style7">
<td valign="top">1456 Red Cloud</td>
<td valign="top">25671.00</td>
<td valign="top">25671.35</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>LOG </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the natural logarithm of <em>float_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn LOG({fn CONVERT(25, SQL_FLOAT)})} AS "LogReturned", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>LogReturned </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">3.218876</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>LOG10 </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the base ten logarithm of <em>float_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn LOG10({fn CONVERT(25, SQL_FLOAT)})} AS "Log10Returned", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>Log10Returned </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">1.39794</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>MOD </strong>( <em>integer_exp1, integer_exp2 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the remainder (modulus) of <em>integer_exp1 </em> divided by <em>integer_exp2</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn MOD(27, 7)} AS "Mod7Returned", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="325">
<tbody>
<tr class="style7">
<td valign="top"><strong>Mod7Returned </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">6</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>PI </strong>()</p>
<p class="style7"><strong>Instruction: </strong>Returns the constant value of pi as a floating point value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn PI()} AS "PI", CompanyName AS &ldquo;CompanyName&rdquo; FROM COMPANY</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>PI </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">3.141593</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>POWER </strong>( <em>numeric_exp|float_exp|integer_exp, integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the value of <em>numeric_exp </em> to the power of <em>integer_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn POWER(4, 3)} AS "PowerValue", CompanyName AS "CompanyName" FROM COMPANY</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>PowerValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">64</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>RADIANS </strong>( <em>numeric_exp|float_exp|integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the number of radians converted from <em>numeric_exp </em> degrees.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn RADIANS(57.29578)} AS "RadiansValue", CompanyName AS &ldquo;CompanyName&rdquo; FROM COMPANY</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>RadiansValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">1</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>RAND </strong>([ <em>integer_exp|float_exp|numeric_exp </em>])</p>
<p class="style7"><strong>Instruction: </strong>Returns a random floating point value using <em>integer_exp </em> as an optional seed value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn RAND()} AS "RandValue" FROM COMPANY</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="265">
<tbody>
<tr>
<td class="style7" valign="top"><strong>RandValue </strong></td>
</tr>
<tr>
<td class="style7" valign="top" height="17">4035516600699198138</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>ROUND </strong>( <em>numeric_exp|float_exp|integer_exp, integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns <em>numeric_exp </em> rounded to <em>integer_exp placed</em>&nbsp;right of the decimal point. If <em>integer_exp </em> is negative, <em>numeric_exp </em> is rounded to | <em>integer_exp </em>| and placed to the left of the decimal point.</p>
<p class="style7"><strong>Example: </strong>SELECT "Name", {fn ROUND(Balance, 1)} AS "RoundBalance", "Balance" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="542">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>RoundBalance </strong></td>
<td valign="top"><strong>Balance </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy Shop</td>
<td valign="top">40.00</td>
<td valign="top">40.00</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">180.00</td>
<td valign="top">180.00</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>SIGN </strong>( <em>numeric_exp|float_exp|integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns an indicator or the sign of <em>numeric_exp</em>. If <em>numeric_exp </em> is less than zero, -1 is returned. If <em>numeric_exp </em> equals zero, 0 is returned. If <em>numeric_exp </em> is more significant than zero, one is returned.</p>
<p class="style7"><strong>Example: </strong>SELECT "Name", {fn SIGN(Balance)} AS "SignOfBalance", "Balance" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="539">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>SignOfBalance </strong></td>
<td valign="top"><strong>Balance </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy</td>
<td valign="top">1</td>
<td valign="top">40.00</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">1</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">1</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">1</td>
<td valign="top">180.00</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">1</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>SIN </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the sine of <em>float_exp, </em>where <em>float_exp </em> is an angle expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn SIN({fn CONVERT(1, SQL_FLOAT)})} AS "SINValue", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>SINValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">0.841471</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>SQRT </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the square root of <em>float_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn SQRT({fn CONVERT(47, SQL_FLOAT)})} AS "SQRTValue", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>SQRTValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">6.855655</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>TAN </strong>( <em>float_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the tangent of <em>float_exp, </em>where <em>float_exp </em> is an angle expressed in radians.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn TAN({fn CONVERT(1, SQL_FLOAT)})} AS "TANValue", CompanyName AS &ldquo;CompanyName&rdquo; FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>TANValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">1.557408</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>TRUNCATE </strong>( <em>numeric_exp|float_exp|numeric_exp, integer_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns <em>numeric_exp </em> truncated to <em>integer_exp </em> places right of the decimal point. If <em>integer_exp </em> is negative, <em>numeric_exp </em> is truncated to | <em>integer_exp </em>| places to the left of the decimal point.</p>
<p class="style7"><strong>Example: </strong>SELECT "Name", {fn TRUNCATE(Balance, 1)} AS "TruncateBalance", "Balance" FROM Customer</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="539">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>TruncateBalance </strong></td>
<td valign="top"><strong>Balance </strong></td>
</tr>
<tr class="style7">
<td valign="top">Adam's Candy</td>
<td valign="top">40.00</td>
<td valign="top">40.00</td>
</tr>
<tr class="style7">
<td valign="top">Andres, Cristina</td>
<td valign="top">.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">Balak, Mike</td>
<td valign="top">.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">330 Main St</td>
<td valign="top">180.00</td>
<td valign="top">180.00</td>
</tr>
<tr class="style7">
<td valign="top">Residential</td>
<td valign="top">.00</td>
<td valign="top">0.00</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p>&nbsp;</p>
<h3 class="style8"><strong>QODBC Time and Date Functions </strong></h3>
<p class="style9"><strong>CURDATE </strong>()</p>
<p class="style7"><strong>Instruction: </strong>Returns the current date as a date value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CURDATE()} AS "CurDate" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="183">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurDate </strong></td>
</tr>
<tr>
<td class="style7" valign="top">2009-07-08</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CURRENT_DATE ()</strong></p>
<p class="style7"><strong>Instruction: </strong>Returns the current date as a date value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CURDATE_DATE()} AS "CurrentDate" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="134">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurrentDate </strong></td>
</tr>
<tr>
<td class="style7" valign="top">2009-07-08</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CURTIME() </strong></p>
<p class="style7"><strong>Instruction: </strong>Returns the local time as a time value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CURTIME()} AS "CurTime" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="130">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurTime </strong></td>
</tr>
<tr>
<td class="style7" valign="top">20:30:31</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CURRENT_ TIME() </strong></p>
<p class="style7"><strong>Instruction: </strong>Returns the current time as a time value.</p>
<p class="style7"><strong>Example </strong>: SELECT {fn CURRENT_TIME()} AS "CurrentTime" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="158">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurrentTime </strong></td>
</tr>
<tr>
<td class="style7" valign="top">20:31:03</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CURRENT_ TIMESTAMP() </strong></p>
<p class="style7"><strong>Instruction: </strong>Returns the current date and time as a timestamp value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CURRENT_TIMESTAMP()} AS "CurrentTimeStamp" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurrentTimeStamp </strong></td>
</tr>
<tr>
<td class="style7" valign="top">2009-07-08 23:10:10.316</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>DAYNAME </strong>( <em>date_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns a character string containing the data source-specific name of the day (for example, Sunday through Saturday or Sun. through Sat. for a data source that uses English) for the day portion of <em>date_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn DAYNAME({fn CURDATE()})} AS "CurDayName", CompanyName AS "CompanyName" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>CurDayName </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">Thursday</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>DAYOFMONTH </strong>( <em>date_exp| string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the day of the month in <em>date_exp </em> as an integer value in the range of 1-31.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn DAYOFMONTH({fn CURDATE()})} AS "CurDayOfMonth" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="175">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurDayOfMonth </strong></td>
</tr>
<tr>
<td class="style7" valign="top">08</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>DAYOFWEEK </strong>( <em>date_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the day of the week in <em>date_exp </em> as an integer value in the range of 1-7, where one represents Sunday.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn DAYOFWEEK({fn CURDATE()})} AS "CurDayOfWeek" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="170">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurDayOfWeek </strong></td>
</tr>
<tr>
<td class="style7" valign="top">3</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>DAYOFYEAR </strong>( <em>date_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the day of the year in <em>date_exp </em> as an integer value in the range of 1-366.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn DAYOFYEAR({fn CURDATE()})} AS "CurDayOfYear" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="162">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurDayOfYear </strong></td>
</tr>
<tr>
<td class="style7" valign="top">189</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>EXTRACT( </strong><em>date_exp|timestamp_exp </em><strong>) </strong></p>
<p class="style7"><strong>Instruction: </strong>Returns the part of <em>date_exp </em> or <em>timestamp_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn EXTRACT(YEAR FROM{fn CURRENT_DATE()})} AS "Year",{fn EXTRACT(MONTH FROM{fn CURRENT_DATE()})} AS "Month",{fn EXTRACT(DAY FROM{fn CURRENT_DATE()})} AS "Day", CompanyName as "CompanyName" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="526">
<tbody>
<tr class="style7">
<td valign="top"><strong>Year </strong></td>
<td valign="top"><strong>Month </strong></td>
<td valign="top"><strong>Day </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">2009</td>
<td valign="top">7</td>
<td valign="top">9</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>HOUR </strong>( <em>time_exp| string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the hour in <em>time_exp</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>,</em></span>&nbsp;<em>char_exp,</em>&nbsp;or <em>timestamp_exp </em> as an integer value in the range of 0-23.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn HOUR({fn CURTIME()})} AS "CurHour" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="133">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurHour </strong></td>
</tr>
<tr>
<td class="style7" valign="top">22</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p class="style9"><strong>MINUTE </strong>( <em>time_exp| string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the minute in <em>time_exp </em> as an integer value in the range of 0-59.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn MINUTE({fn CURTIME()})} AS "CurMinute" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="135">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurMinute </strong></td>
</tr>
<tr>
<td class="style7" valign="top">59</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>MONTH </strong>( <em>date_exp| string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the month in <em>date_exp </em> as an integer value in the range of 1-12.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn MONTH({fn CURDATE()})} AS "CurMonth" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="136">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurMonth </strong></td>
</tr>
<tr>
<td class="style7" valign="top">07</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>MONTHNAME </strong>( <em>date_exp| string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns a character string containing the data source-specific name of the month (for example, January through December or Jan. through Dec. for a data source that uses English) for the month portion of <em>date_exp</em>.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn MONTHNAME({fn CURDATE()})} AS "CurMonthName&rdquo;, CompanyName AS "CompanyName" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>CurMonthName </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">July</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>NOW </strong>()</p>
<p class="style7"><strong>Instruction: </strong>Returns the current date and time as a timestamp value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn NOW()} AS "Now" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="227">
<tbody>
<tr>
<td class="style7" valign="top"><strong>Now </strong></td>
</tr>
<tr>
<td class="style7" valign="top">2009-07-08 23:05:45.144</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>QUARTER </strong>( <em>date_exp| string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the quarter in the <em>date_exp </em> as an integer value in the range of 1-4, where 1 represents January 1 through March 31.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn QUARTER({fn CURDATE()})} AS "CurQuarter", CompanyName AS "CompanyName" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>CurQuarter </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">3</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>SECOND </strong>( <em>time_exp| string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the second in <em>time_exp </em> as an integer value in the range of 0-59.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn SECOND({fn CURTIME()})} AS "CurSecond" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="146">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurSecond </strong></td>
</tr>
<tr>
<td class="style7" valign="top">09</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>TIMESTAMPADD </strong>( <em>interval, integer_exp, timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the timestamp calculated by adding <em>integer_exp </em> intervals of type <em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>to <em>timestamp_exp</em>. Valid values of <em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>are the following keywords: SQL_TSI_FRAC_SECOND, SQL_TSI_HOUR, SQL_TSI_SECOND, SQL_TSI_DAY, SQL_TSI_MINUTE, SQL_TSI_WEEK, SQL_TSI_MONTH, SQL_TSI_QUARTER, SQL_TSI_YEAR, where fractional seconds are expressed in billionths of a second.</p>
<p class="style7"><strong>Notes: </strong>If <em>timestamp_exp </em> is a time value and <em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>specifies days, weeks, months, quarters, or years, the date portion of <em>timestamp_exp </em> is set to the current date before calculating the resulting timestamp.</p>
<p class="style7">&nbsp;&nbsp;&nbsp;&nbsp; If <em>timestamp_exp </em> is a date value and <em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>specifies fractional seconds, seconds, minutes, or hours, the time portion of <em>timestamp_exp </em> is set to 0 before calculating the resulting timestamp.</p>
<p class="style7"><strong>Example: </strong>SELECT Name, {fn TIMESTAMPADD(SQL_TSI_YEAR, 1, HiredDate)} AS "Anniversary" FROM Employee</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="399">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>Anniversary </strong></td>
</tr>
<tr class="style7">
<td valign="top">Duncan Fisher</td>
<td valign="top">2012-06-15 00:00:00.000</td>
</tr>
<tr class="style7">
<td valign="top">Jenny Miller</td>
<td valign="top">2012-11-01 00:00:00.000</td>
</tr>
<tr class="style7">
<td valign="top">Shane B. Hamby</td>
<td valign="top">2012-06-18 00:00:00.000</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>TIMESTAMPDIFF </strong>( <em>interval, timestamp_exp1, timestamp_exp2 </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the integer number of intervals of type <em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>by which <em>timestamp_exp2 </em> is greater than <em>timestamp_exp1</em>. Valid values of <em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>are the following keywords: SQL_TSI_FRAC_SECOND, SQL_TSI_HOUR, SQL_TSI_SECOND, SQL_TSI_DAY, SQL_TSI_MINUTE, SQL_TSI_WEEK, SQL_TSI_MONTH, SQL_TSI_QUARTER, SQL_TSI_YEAR, where fractional seconds are expressed in billionths of a second.</p>
<p class="style7"><strong>Note: </strong>If either timestamp expression is a time value and the&nbsp;<em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>specifies days, weeks, months, quarters, or years, the date portion of that timestamp is set to the current date before calculating the difference between the timestamps.</p>
<p class="style7">&nbsp;&nbsp;&nbsp;&nbsp; If either timestamp expression is a date value and the&nbsp;<em>interval</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>specifies fractional seconds, seconds, minutes, or hours, the time portion of that timestamp is set to 0 before calculating the difference between the timestamps.</p>
<p class="style7"><strong>Example: </strong>SELECT Name, {fn TIMESTAMPDIFF(SQL_TSI_YEAR, {fn CURDATE()}, HiredDate)} AS "YearsWorked&rdquo; FROM Employee</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>YearsWorked </strong></td>
</tr>
<tr class="style7">
<td valign="top">Duncan Fisher</td>
<td valign="top">2</td>
</tr>
<tr class="style7">
<td valign="top">Jenny Miller</td>
<td valign="top">2</td>
</tr>
<tr class="style7">
<td valign="top">Shane B. Hamby</td>
<td valign="top">2</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong><strong>&nbsp; </strong></p>
<p class="style9"><strong>WEEK </strong>( <em>date_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the week of the year in <em>date_exp </em> as an integer value in the range of 1-53.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn WEEK({fn CURDATE()})} AS "CurWeek" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="122">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurWeek </strong></td>
</tr>
<tr>
<td class="style7" valign="top">27</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>YEAR </strong>( <em>date_exp|string_exp|timestamp_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the year in <em>date_exp </em> as an integer value.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn YEAR({fn CURDATE()})} AS "CurYear" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="126">
<tbody>
<tr>
<td class="style7" valign="top"><strong>CurYear </strong></td>
</tr>
<tr>
<td class="style7" valign="top">2009</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3 class="style8"><strong>QODBC System Functions </strong></h3>
<p class="style9"><strong>DATABASE </strong>()</p>
<p class="style7"><strong>Instruction: </strong>Returns the name of the database in use at the time this function is called.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn DATABASE()} AS "OpenDatabase" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="1544">
<tbody>
<tr>
<td class="style7" width="1112"><strong>OpenDatabase </strong></td>
<td width="416"><strong>CompanyName </strong></td>
</tr>
<tr>
<td class="style7" valign="top">C:\Documents and Settings\All Users\Documents\Intuit\QuickBooks\Sample Company Files\QuickBooks Enterprise Solutions 9.0\sample_service-based business.qbw</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong><strong>&nbsp; </strong></p>
<p class="style9"><strong>IFNULL </strong>( <em>exp, value </em>)</p>
<p class="style7"><strong>Instruction: </strong>If <em>exp</em><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><em>&nbsp;</em></span>is null, the&nbsp;<em>value&nbsp;</em>is returned. If <em>exp&nbsp;</em>is not null, <em>exp&nbsp;</em>is replaced. The possible data type(s) of <em>value&nbsp;</em>must be compatible with the data type of <em>exp</em>.</p>
<p class="style7"><strong>Example: </strong>Select Name, {fn IFNULL(Fax, 'Missing Fax')} as "FixedFax" from Employee</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="324">
<tbody>
<tr class="style7">
<td valign="top"><strong>Name </strong></td>
<td valign="top"><strong>FixedFax </strong></td>
</tr>
<tr class="style7">
<td valign="top">Duncan</td>
<td valign="top">Missing Fax</td>
</tr>
<tr class="style7">
<td valign="top">Jenny Miller</td>
<td valign="top">Missing Fax</td>
</tr>
<tr class="style7">
<td valign="top">Shane B. Hamby</td>
<td valign="top">Missing Fax</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp;</strong><strong>&nbsp; </strong></p>
<p class="style9"><strong>PARENT( </strong><em>string_exp </em><strong>) </strong></p>
<p class="style7"><strong>Instruction: </strong>Returns the characters before the colon it finds in <em>string_exp </em></p>
<p class="style7"><strong>Example </strong>: SELECT {fn PARENT(FullName)} AS &ldquo;ParentValue&rdquo;,FullName FROM Account CALLDIRECT</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="578">
<tbody>
<tr class="style7">
<td valign="top"><strong>ParentValue </strong></td>
<td valign="top"><strong>FullName </strong></td>
</tr>
<tr class="style7">
<td valign="top">Truck</td>
<td valign="top">Truck:Accumulated Depreciation</td>
</tr>
<tr class="style7">
<td valign="top">QuickBooks Credit Card</td>
<td valign="top">QuickBooks Credit Card</td>
</tr>
<tr class="style7">
<td valign="top">QuickBooks Credit Card</td>
<td valign="top">QuickBooks Credit Card:QBCC Field Office</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CHILD </strong>( <em>string_exp </em>)</p>
<p class="style7"><strong>Instruction: </strong>Returns the characters after the colon it finds in <em>string_exp </em></p>
<p class="style7"><strong>Example: </strong>SELECT {fn CHILD(FullName)} AS &ldquo;ChildValue&rdquo;,FullName FROM Account CALLDIRECT</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="581">
<tbody>
<tr class="style7">
<td valign="top"><strong>ChildValue </strong></td>
<td valign="top"><strong>FullName </strong></td>
</tr>
<tr class="style7">
<td valign="top">Accumulated Depreciation</td>
<td valign="top">Truck:Accumulated Depreciation</td>
</tr>
<tr class="style7">
<td valign="top">QuickBooks Credit Card</td>
<td valign="top">QuickBooks Credit Card</td>
</tr>
<tr class="style7">
<td valign="top">QBCC Field Office</td>
<td valign="top">QuickBooks Credit Card:QBCC Field Office</td>
</tr>
<tr class="style7">
<td valign="top">&hellip;</td>
<td valign="top">&hellip;</td>
</tr>
</tbody>
</table>
<p><strong>&nbsp; </strong></p>
<p class="style9"><strong>CONVERT </strong>(integer_exp, sqltype_exp)</p>
<p class="style7"><strong>Instruction: </strong>Returns the slqtype value, which is converted from an integer value and can be used in numeric functions.</p>
<p class="style7"><strong>Example: </strong>SELECT {fn CONVERT(21,SQL_FLOAT)} AS "ConverValue", CompanyName AS "CompanyName" FROM Company</p>
<p class="style7"><strong>Returns: </strong></p>
<table border="1" width="301">
<tbody>
<tr class="style7">
<td valign="top"><strong>ConverValue </strong></td>
<td valign="top"><strong>CompanyName </strong></td>
</tr>
<tr class="style7">
<td valign="top">21</td>
<td valign="top">Larry's</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p><strong>&nbsp; </strong></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[ [QXL-ALL] Function List]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3071]]></link>
<guid isPermaLink="false"><![CDATA[6917ff2a7b53421ff4066020e2d89eec]]></guid>
<pubDate><![CDATA[Fri, 17 Mar 2023 13:55:53 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[&nbsp;[QXL-Desktop] &amp; [QXL-Online] Function List
QXL Desktop&nbsp;uses the QODBC Desktop driver to query QuickBooks Desktop. Commands available in QODBC Desktop will also work in the QXL desktop application.
QXL Online uses the QODBC Online driver t...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">&nbsp;[QXL-Desktop] &amp; [QXL-Online] Function List</span></h2>
<p>QXL Desktop&nbsp;uses the QODBC Desktop driver to query QuickBooks Desktop. Commands available in QODBC Desktop will also work in the QXL desktop application.</p>
<p>QXL Online uses the QODBC Online driver to query QuickBooks Online. Commands available in QODBC Online will also work in the QXL Online application.</p>
<p>Please refer to: <a href="https://qodbc.com/links/2343">https://qodbc.com/links/2343</a>.</p>
<h2 class="style6">&nbsp;</h2>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QXL-ALL] Stored Procedures Command List]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3070]]></link>
<guid isPermaLink="false"><![CDATA[bb073f2855d769be5bf191f6378f7150]]></guid>
<pubDate><![CDATA[Fri, 17 Mar 2023 13:43:22 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[[QXL- Desktop] &amp; [QXL- Online]&nbsp;Stored Procedures Command List
QXL Desktop&nbsp;uses the QODBC Desktop driver to query QuickBooks Desktop. Commands available in QODBC Desktop will also work in the QXL desktop application.
QXL Online uses the QOD...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">[QXL- Desktop] &amp; [QXL- Online]&nbsp;Stored Procedures Command List</span></h2>
<p>QXL Desktop&nbsp;uses the QODBC Desktop driver to query QuickBooks Desktop. Commands available in QODBC Desktop will also work in the QXL desktop application.</p>
<p>QXL Online uses the QODBC Online driver to query QuickBooks Online. Commands available in QODBC Online will also work in the QXL Online application.</p>
<p>Please refer to: <a href="https://qodbc.com/links/2342">https://qodbc.com/links/2342</a></p>
<h2 class="style6">&nbsp;</h2>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC ALL] - How to increase the update or delete SQL statement performance.]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3061]]></link>
<guid isPermaLink="false"><![CDATA[4aa0e93b918848be0b7728b4b1568d8a]]></guid>
<pubDate><![CDATA[Tue, 15 Nov 2022 10:27:30 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[[QODBC ALL] - How to increase the update or delete SQL statement performance.
Problem Description:
Ran this SQL to move an invoice from one Customer to another:Update invoice set CustomerRefListID&nbsp;= '1500' where TxnNumber = 8453It took about 15+ mi...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">[QODBC ALL] - How to increase the update or delete SQL statement performance.</span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p>Ran this SQL to move an invoice from one Customer to another:<br /><br />Update invoice set CustomerRefListID&nbsp;= '1500' where TxnNumber = 8453<br /><br />It took about 15+ minutes, and the status dialog showed it waiting on QuickBooks as it went through all 2,500 customers - but it took over 15 minutes to complete! I have a situation where moving an invoice to another Customer may occur several times in a batch of invoices. Are there additional conditions I can put in the WHERE clause that would speed this up?</p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p>Please make sure Optimizer is enabled.&nbsp; - <a href="https://qodbc.com/links/2358">https://qodbc.com/links/2358</a></p>
<p>If you are executing an SQL statement for the first time on this table, QODBC has built the optimizer before processing the SQL statement. "Waiting on QuickBooks" may take longer than usual.</p>
<p>Please run the SQL statement again, and if you are still facing the same issue, please try the following options.</p>
<p>&nbsp;</p>
<p>Make use of the index fields, such as TxnID or TxnDate, to filter the number of records scanned.</p>
<p>Update invoice set CustomerRefListID&nbsp;= '1500' where TxnID='ValueOfYourTxnID'</p>
<p>or</p>
<p>Update invoice set CustomerRefListID&nbsp;= '1500' where&nbsp;TxnDate&gt;={d'2022-11-10'} and&nbsp;&nbsp;TxnDate&lt;={d'2022-11-15'} and&nbsp;&nbsp;TxnNumber = 8453</p>
<p>&nbsp;</p>
<p>If you are still facing the issue, please try using the UNOPTIMIZED keyword.</p>
<p>Update invoice UNOPTIMIZED set CustomerRefListID&nbsp;= '1500' where&nbsp;TxnID='ValueOfYourTxnID'</p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p>We have low performance in SQL Server Linked Server using QREMOTE.<br /><br />For example, the below statement takes less than 2 seconds in the QODBC 64-bit Test tool and more than 2 minutes in our linked server:<br />UPDATE Customer SET JobTitle = 'Job3' WHERE ListID='8000000F-1466614340'.<br /><br />In SQL Server, the statement seems to scan the whole table to be executed (14000 records)<br /><br />We are running QuickBooks and SQL Server on the same machine on a cloud server. All drivers are 64bits. The same system DSN is used in Test Tool and in SQL Linked server: QuickBooks Data 64-bit QRemote.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p>Please make sure Optimizer is enabled.&nbsp; - <a href="https://qodbc.com/links/2358">https://qodbc.com/links/2358</a></p>
<p>&nbsp;</p>
<p>Update QREMOTE...customer set JobTitle = 'Job' where ListID='8000000F-1466614340'</p>
<p>&nbsp;</p>
<p>When you use the above query, SQL Server will fetch all the data from the Customer table. SQL Server will then apply the filter of List ID.</p>
<p>SQL Server will generate an update statement from the derived result and send it to QODBC/QRemote.</p>
<p>Thus, for a single record update, the entire table is scanned.</p>
<p><br />To avoid this, use OpenQuery and select only the record you want to update.</p>
<p>Please use the Index fields in the "select" and "update" clauses.</p>
<p><br />Example:<br />update openquery (QRemote, 'select ListID, JobTitle from Customer where ListID=''8000000F-1466614340''') set JobTitle = 'Job' where ListID='8000000F-1466614340'</p>
<p>Note: Here, we are using ListID (the index field) in the select statement and the OpenQuery update statement.</p>
<p>&nbsp;</p>
<p>If you are still facing the issue, please use the UNOPTIMIZED keyword.</p>
<p>update openquery (QRemote, 'select ListID, JobTitle from Customer UNOPTIMIZED where ListID=''8000000F-1466614340''') set JobTitle = 'Job' where ListID='8000000F-1466614340'</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - There was an error saving an Employee List]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3033]]></link>
<guid isPermaLink="false"><![CDATA[272e11700558e27be60f7489d2d782e7]]></guid>
<pubDate><![CDATA[Thu, 23 Jan 2020 14:09:37 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - There was an error saving an Employees List. The address is invalid
Problem Description:
We have searched the wiki and the internet and tried endlessly to 'Insert an Employee.'
Below is our latest effort, all to no avail-
Insert into...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - There was an error saving an Employees List. The address is invalid</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p>We have searched the wiki and the internet and tried endlessly to 'Insert an Employee.'</p>
<p>Below is our latest effort, all to no avail-</p>
<p>Insert into Employee (FirstName, LastName, EmployeeAddressAddr1, EmployeeAddressAddr2, EmployeeAddressState, EmployeeAddressPostalCode) Values ('Jake,' 'Wrestl,' '123 Main','456 stand', 'FL,' '12345')</p>
<p>I do not know what is wrong.</p>
<p>Can you shed some light on the error below, and 'More Simply' provide a Sample to 'Insert an Employee'?</p>
<p align="center">&nbsp;<img src="//support.flexquarters.com/esupport/newimages/3033/The address is invalid.png" alt="" /></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span>&nbsp;</h3>
<p>The solution is to include the field 'EmployeeAddressCity' in your SQL statement.</p>
<p>For Example:</p>
<p>Insert into Employee (FirstName, LastName, EmployeeAddressAddr1, EmployeeAddressAddr2, EmployeeAddressState, EmployeeAddressCity, EmployeeAddressPostalCode) Values ('Jake,' 'Wrestl,' '123 Main','456 stand', 'FL,' 'Coral,' '12345')</p>
<p>You can view the newly added Employee records in the QuickBooks application.</p>
<p align="center">&nbsp;<img src="//support.flexquarters.com/esupport/newimages/3033/QODBC Support Wizard.png" alt="" /></p>
<p>Go to QuickBooks, and you will see the Employee has been added.</p>
<p align="center">&nbsp;<img src="//support.flexquarters.com/esupport/newimages/3033/EmployeeCreated.png" alt="" /></p>
<p>In the "Address &amp; Contact" tab, you will see the city information added in QuickBooks.</p>
<p align="center">&nbsp;<img src="//support.flexquarters.com/esupport/newimages/3033/MoreInfo.png" alt="" /></p>
<p>The "EmployeeAddressCity" field is not mandatory to use when inserting an Employee record, but there are specific fields that are conditionally required.</p>
<p>For Example:</p>
<p>If you specify FirstName, the Last name is optional. Either FirstName or LastName is required.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Tags: Employees, Employee insert</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to use PowerShell with QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2826]]></link>
<guid isPermaLink="false"><![CDATA[12311d05c9aa67765703984239511212]]></guid>
<pubDate><![CDATA[Thu, 01 Sep 2016 10:11:01 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How to use PowerShell with QODBC
Download Sample
Sample Code for using QODBC DSN:
$connectstring = "DSN=QuickBooks Data;"$sql = "Select TOP 10 Name from Customer"$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)$conn.open()$cmd = New-O...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How to use PowerShell with QODBC</span></h2>
<p><a href="http://support.flexquarters.com/esupport/newimages/PowerShell/DisplaySQL.zip">Download Sample</a></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Sample Code for using QODBC DSN:</span></h3>
<p>$connectstring = "DSN=QuickBooks Data;"<br /><br />$sql = "Select TOP 10 Name from Customer"<br /><br />$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)<br /><br />$conn.open()<br /><br />$cmd = New-Object system.Data.Odbc.OdbcCommand($sql,$conn)<br /><br />$da = New-Object system.Data.Odbc.OdbcDataAdapter($cmd)<br /><br />$dt = New-Object system.Data. data table<br /><br />$null = $da.fill($dt)<br /><br />$conn.close()<br /><br />$dt<br /><br /></p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/PowerShell/step1.png" alt="" /></p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Script execution &amp; Result:</span></span></h3>
<p>Open Windows PowerShell (x86) from the Start menu: <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/PowerShell/step2.png" alt="" /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/PowerShell/step3.png" alt="" /></p>
<p>Navigate to your PowerShell script folder: <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/PowerShell/step4.png" alt="" /></p>
<p><br />Run your PowerShell script: <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/PowerShell/step5.png" alt="" /></p>
<p>&nbsp;</p>
<p><br />Result: <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/PowerShell/step6.png" alt="" /></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Sample Code for using QRemote DSN:</span></h3>
<p>$connectstring = "DSN=QuickBooks Data QRemote;"<br /><br />$sql = "Select TOP 10 Name from Customer"<br /><br />$conn = New-Object System.Data.Odbc.OdbcConnection($connectstring)<br /><br />$conn.open()<br /><br />$cmd = New-Object system.Data.Odbc.OdbcCommand($sql,$conn)<br /><br />$da = New-Object system.Data.Odbc.OdbcDataAdapter($cmd)<br /><br />$dt = New-Object system.Data. data table<br /><br />$null = $da.fill($dt)<br /><br />$conn.close()<br /><br />$dt<br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/PowerShell/step7.png" alt="" /></p>
<p><br />Please refer to how<a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2436">&nbsp;to configure QRemote</a>.</p>
<p>Please Note: If you have a 64-bit application, you must use QRemote 64-bit DSN "<strong>QuickBooks Data 64-bit QRemote.</strong>"</p>
<p>Also, Refer: <br /><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2439" target="_blank">QODBC Reports Architecture Mismatch Problem When Connecting</a></p>
<hr class="kbhr" />]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-ALL] Troubleshooting - Update from a select statement not working]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2818]]></link>
<guid isPermaLink="false"><![CDATA[d53697441ef12a45422f6660202f9840]]></guid>
<pubDate><![CDATA[Fri, 19 Aug 2016 13:02:28 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Update from a select statement not working 
Problem Description:
I am trying to update records through the select statement. But it is not working. UPDATE Customer SET CustomFieldProjectNumber = i.JobNumber FROM ( SELECT ListID, {fn S...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Update from a select statement not working </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I am trying to update records through the select statement. But it is not working. <br /><br />UPDATE Customer SET CustomFieldProjectNumber = i.JobNumber FROM ( SELECT ListID, {fn SUBSTRING("Name", 1, 5)} AS JobNumber FROM Customer WHERE TimeCreated &gt; {ts '2016-01-01 00:00:00.000'} ) i WHERE i.ListID = Customer.ListID<br /><br />I am getting the "Unexpected extra token: (" error in QODBC Test Tool.&nbsp;</span>&nbsp;</p>
<p><img src="https://support.flexquarters.com/esupport/newimages/2818/Q1.png" alt="" /></p>
<p>Any Assistance Is Appreciated.</p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can execute the query below in MS Access linked table without any issue.<br /><br />Please refer to&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2470/57/using-quickbooks-data-with-access-2013-linked-tables-32-bit" target="_blank">How to Use QODBC with MS Access 2016 / 365 / 2013 32-bit </a></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You need to link the Customer table in MS Access &amp; execute the query in the Access query editor.<br /><br />MS Access&gt;&gt; create tab &gt;&gt; Query Design &gt;&gt; Paste query &gt;&gt; Execute query using Run button <br /><br />Update Customer qe inner join Customer de on qe.ListID = de.ListID set qe.CustomFieldProjectNumber = MID (de.Name,1,5) WHERE qe.TimeCreated &gt;#2016-01-01 00:00:01#<br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Getting incomplete data when running ProfitAndLossBudgetVsActual report]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2817]]></link>
<guid isPermaLink="false"><![CDATA[182e6c2d3d78eef40e5dac7da77a748f]]></guid>
<pubDate><![CDATA[Fri, 19 Aug 2016 12:58:21 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Getting incomplete data when running the ProfitAndLossBudgetVsActual report 
Problem Description:
Good Day To You. Using This Sp_report And Having Some Problems With The Column Layout. Command Text Is As Follows: Sp_report Profitandlo...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Getting incomplete data when running the ProfitAndLossBudgetVsActual report </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Good Day To You. Using This Sp_report And Having Some Problems With The Column Layout. Command Text Is As Follows: Sp_report Profitandlossbudgetvsactual Show Account name, Account number, Amount, Budget Parameters Fiscalyear=2015, Classfilterfullnames =' health Center,' 'administrative.' <br /><br />I'm Getting 12 Columns, As One Would Expect, But The 12th Column Is The Sum Of The Previous 11 Columns, Not The 12th Month. This Is True For Both The Amount And Budget Segments. Also, The Budget Amount For The 11th Month is exactly one-half of the Actual Budgeted Amount. I Have Run The Actual Report, And The Totals For Each Month Are Correct For Both the Amount And Budget Until The Last Two Months In The report. <br /><br />Also, if I replace the FiscalYear=2015, with DateMacro=&rsquo;ThisYear&rsquo; I get this<br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/ProfitAndLossBudgetVsActual/step1.png" alt="" border="0" /> <br /><br />Any Assistance Is Appreciated.&nbsp;</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please ensure that you are passing the same parameter in the report query you passed in QuickBooks UI.<br /><br />Also, for the budget report, the Fiscal Year parameter is required. Without it, a report will not execute. So you need to keep the Fiscal Year parameter &amp; add other date parameters. <br /><br />For Example:<br /><br />sp_report ProfitAndLossBudgetVsActual show Amount_Title, Budget_Title, Difference_Title, Percent_Title, Text, Label, Amount, Budget, Difference, Percent parameters FiscalYear = 2015, DateFrom={d'2015-10-01'}, DateTo={d'2016-09-30'}, BudgetCriterion = 'Accounts,' SummarizeBudgetColumnsBy = 'Date,' SummarizeBudgetRowsBy = 'Account' <br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - QODBC Record Set Issue]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2806]]></link>
<guid isPermaLink="false"><![CDATA[c0f971d8cd24364f2029fcb9ac7b71f5]]></guid>
<pubDate><![CDATA[Wed, 13 Jul 2016 15:10:57 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - QODBC Record Set Issue 
Problem Description:
I am using the code below. It is returning records &amp; giving me the correct result. But if I change the query from "SELECT Name FROM customer" to "SELECT * FROM customer," it does not re...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - QODBC Record Set Issue </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I am using the code below. It is returning records &amp; giving me the correct result. But if I change the query from "SELECT Name FROM customer" to "SELECT * FROM customer," it does not return any records &amp; giving me the incorrect result. I am getting the following error:<br /><br />[QODBC] Internal error<br />440: BOF or EOF is True, or the current record has been deleted. The requested operation requires a current record.<br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/RecordSet/step1.png" alt="" border="0" /><br /><br /> <span style="font-family: Arial,Helvetica,sans-serif;"> Public Sub example select()<br />Const adOpenStatic = 3<br />Const adLockOptimistic = 3<br />Dim oConnection<br />Dim oRecordset<br />Dim sMsg<br />Dim sConnectString<br />Dim sSQL<br /> <br />sConnectString = "Driver={QODBC Driver for QuickBooks};DFQ=C:\QuickBooks\Maintenance.qbw;OpenMode=F;OLE DB Services=-2;"<br />sSQL = "SELECT Name FROM customer"<br />Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")<br /> <br />oConnection.Open sConnectString<br />oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic<br />sMsg = "**********************" &amp; Chr(100)<br />Do While (Not oRecordset.EOF)<br />sMsg = sMsg &amp; oRecordset.Fields("Name") &amp; Chr(100)<br />oRecordset.MoveNext<br />Loop<br />sMsg = sMsg &amp; "**********************"<br />MsgBox sMsg<br /> <br />oRecordset.Close<br />Set oRecordset = Nothing<br />oConnection.Close<br />Set oConnection = Nothing<br />End Sub</span></span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">To resolve the issue, you need to add the line below to your connection string.<br /><br />OptimizerAllowDirtyReads=N <br /><br />For Example: <br /><br />sConnectString = "Driver={QODBC Driver for QuickBooks};DFQ=C:\QuickBooks\Maintenance.qbw;OpenMode=F;OLE DB Services=-2;OptimizerAllowDirtyReads=N" <br /><br />After changing this, you can get the correct result.<br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Sample Code for C++ with QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2779]]></link>
<guid isPermaLink="false"><![CDATA[b1300291698eadedb559786c809cc592]]></guid>
<pubDate><![CDATA[Mon, 23 May 2016 14:35:44 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Sample Code for C++ with QODBC 
#include &lt;iostream&gt;#include &lt;windows.h&gt;#include &lt;sql.h&gt;#include &lt;sqlext.h&gt;#include &lt;string.h&gt;#include &lt;stdio.h&gt;#include &lt;stdlib.h&gt;#include &lt;conio.h&gt; using namespace std; voi...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Sample Code for C++ with QODBC </span></h2>
<p><span style="font-family: Arial,Helvetica,sans-serif;">#include &lt;iostream&gt;<br />#include &lt;windows.h&gt;<br />#include &lt;sql.h&gt;<br />#include &lt;sqlext.h&gt;<br />#include &lt;string.h&gt;<br />#include &lt;stdio.h&gt;<br />#include &lt;stdlib.h&gt;<br />#include &lt;conio.h&gt;<br /> <br />using namespace std;<br /> <br />void ConvertTimeStampStructToString(TIMESTAMP_STRUCT tTimeStamp, CHAR *strTimeStamp, LONG lSizeTimeStamp)<br />{<br />strcpy(strTimeStamp, "");<br />sprintf(sr timestamp, "%d-%d-%d %d:%d:%d," tTimeStamp.year, tTimeStamp.month, tTimeStamp.day, tTimeStamp.hour, tTimeStamp.minute, tTimeStamp.second);<br />}<br /> <br />int main()<br />{<br />SQLHENV henv = SQL_NULL_HENV; // Environment<br />SQLHDBC hdbc = SQL_NULL_HDBC; // Connection handle<br />SQLHSTMT hstmt = SQL_NULL_HSTMT; // Statement handle<br /> <br />SQLCHAR sListId[256] = "";<br />SQLCHAR sEditSequence[256] = "";<br />SQLCHAR sName[256] = "";<br />BOOL bIsActive = 0;<br />TIMESTAMP_STRUCT tTimeModified = {0};<br />TIMESTAMP_STRUCT tTimeCreated = {0}; <br />SQLINTEGER cbData;<br /> <br />SQLRETURN retcode;<br />int iKey;<br /> <br />CHAR *sTimeStamp = new CHAR[32]();<br /> <br />SQLCHAR statement[]="SELECT * FROM ShipMethod";<br /> <br />retcode = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &amp;henv);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLAllocHandle failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLAllocHandle: Environment handle initialized." &lt;&lt; endl;<br /> <br />retcode = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION,(SQLCHAR *)(void*)SQL_OV_ODBC2, -1);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLSetEnvAttr failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLSetEnvAttr : ODBC 2.0 initialized." &lt;&lt; endl;<br /> <br />retcode = SQLAllocHandle(SQL_HANDLE_DBC, henv, &amp;hdbc);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLAllocHandle failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLSetEnvAttr: Database handle initialized." &lt;&lt; endl;<br /> <br />retcode = SQLSetConnectAttr(hdbc, SQL_LOGIN_TIMEOUT, (SQLPOINTER)10, 0);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLSetConnectAttr failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLSetConnectAttr : Set Login Timeout." &lt;&lt; endl;<br /> <br />retcode = SQLConnect(hdbc, (SQLCHAR*) <strong>"QuickBooks Data" </strong>, SQL_NTS, (SQLCHAR*) NULL, 0, NULL, 0);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLConnect failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLConnect : Database connection successfully." &lt;&lt; endl;<br /> <br />retcode = SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &amp;hstmt);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLAllocHandle failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLAllocHandle : Handle initialized." &lt;&lt; endl;<br /> <br />retcode = SQLExecDirect(hstmt, statement, SQL_NTS);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLExecDirect failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLExecDirect : Query executed successfully." &lt;&lt; endl;<br /> <br />cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl;<br />cout &lt;&lt; "Query: <strong> SELECT * FROM ShipMethod </strong>" &lt;&lt; endl;<br />cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl;<br />cout &lt;&lt; "ListId" &lt;&lt; ", " &lt;&lt; "TimeModified" &lt;&lt; ", " &lt;&lt; "TimeCreated" &lt;&lt; ", " &lt;&lt; "EditSequence" &lt;&lt; ", " &lt;&lt; "Name" &lt;&lt; ", " &lt;&lt; "IsActive" &lt;&lt; endl &lt;&lt; endl;<br />cout &lt;&lt; endl &lt;&lt; endl;<br />while(SQLFetch(hstmt) == SQL_SUCCESS){<br /> <br />retcode = SQLGetData(hstmt, 1, SQL_C_CHAR, (SQLPOINTER)sListId, sizeof(sListId), &amp;cbData);<br /> <br />retcode = SQLGetData(hstmt, 2, SQL_C_TIMESTAMP, (SQLPOINTER)&amp;tTimeModified, sizeof(tTimeModified), &amp;cbData);<br /> <br />retcode = SQLGetData(hstmt, 3, SQL_C_TIMESTAMP, (SQLPOINTER)&amp;tTimeCreated, sizeof(tTimeCreated), &amp;cbData);<br /> <br />retcode = SQLGetData(hstmt, 4, SQL_C_CHAR, (SQLPOINTER)sEditSequence, sizeof(sEditSequence), &amp;cbData);<br /> <br />retcode = SQLGetData(hstmt, 5, SQL_C_CHAR, (SQLPOINTER)sName, sizeof(sName), &amp;cbData);<br /> <br />retcode = SQLGetData(hstmt, 6, SQL_C_BIT, (SQLPOINTER)bIsActive, sizeof(bIsActive), &amp;cbData);<br /> <br />cout &lt;&lt; sListId &lt;&lt; ", ";<br />ConvertTimeStampStructToString(tTimeModified, sTimeStamp, sizeof(sTimeStamp));<br />cout &lt;&lt; sTimeStamp &lt;&lt; ", ";<br />ConvertTimeStampStructToString(tTimeCreated, sTimeStamp, sizeof(sTimeStamp));<br />cout &lt;&lt; sTimeStamp &lt;&lt; ", ";<br />cout &lt;&lt; sEditSequence &lt;&lt; ", ";<br />cout &lt;&lt; sName &lt;&lt; ", ";<br />cout &lt;&lt; bIsActive &lt;&lt; endl;<br />}<br />delete [] sTimeStamp;<br />cout &lt;&lt; endl &lt;&lt; endl;<br /> <br />retcode = SQLFreeHandle(SQL_HANDLE_STMT, hstmt);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLFreeHandle failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLFreeHandle : Handle freed." &lt;&lt; endl;<br /> <br />retcode = SQLDisconnect (hdbc);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLDisconnect failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLDisconnect : Close database connection." &lt;&lt; endl;<br /> <br />retcode = SQLFreeHandle(SQL_HANDLE_DBC, hdbc);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLFreeHandle failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLFreeHandle : Database handle freed." &lt;&lt; endl;<br /> <br /> <br />retcode = SQLFreeHandle(SQL_HANDLE_ENV, henv);<br />if(retcode != SQL_SUCCESS){<br />cout &lt;&lt; "SQLFreeHandle failed. exit program" &lt;&lt; endl;<br />return 0;<br />}<br />cout &lt;&lt; "SQLFreeHandle : Environment handle freed." &lt;&lt; endl;<br /> <br />printf("Press Any Key To Exit...");<br />getch();<br />return 0;<br />}<br /> <br />Please <a href="http://support.flexquarters.com/esupport/newimages/C++/sample-c-plus-plus-qodbc.zip">click here</a>&nbsp;to download the C++ code. </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I see backorder items that have been invoiced but not shipped]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2776]]></link>
<guid isPermaLink="false"><![CDATA[6244b2ba957c48bc64582cf2bcec3d04]]></guid>
<pubDate><![CDATA[Mon, 09 May 2016 10:04:05 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How do I see backorder items that have been invoiced but not shipped 
Problem Description:
Could someone kindly provide me with a sample, or is there a stored procedure that would allow me to only pull out back-ordered invoices from t...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How do I see backorder items that have been invoiced but not shipped </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Could someone kindly provide me with a sample, or is there a stored procedure that would allow me to only pull out back-ordered invoices from the invoice table? <br /><br />If a customer orders some items, we create an invoice. Then, if some things are back-ordered, when the packing slip is made, it shows they were not sent out, and that item is back-ordered. I was looking for a query or an SP that would lead me to only invoices that have not been completely shipped, or all the items in backorder.</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">All you need to do is use the ItemInventory table to pick up the quantity on hand and compare it with the ordered quantity ordered and invoiced to date (invoiced or not), and call the column "Qty to Pick." <br /><br />Something along the lines of: <br /><br />SELECT SalesOrderLine.SalesOrderLIneItemRefFullName as Type, SalesOrderLine.TxnDate as Date, SalesOrderLine.DueDate, SalesOrderLine.RefNumber as Num, SalesOrderLine.CustomerRefFullName as Name, SalesOrderLine.SalesOrderLineQuantity as "Qty Ordered," SalesOrderLine.SalesOrderLineInvoiced as "Qty Invoiced," (SalesOrderLine.SalesOrderLineQuantity - SalesOrderLine.SalesOrderLineInvoiced) as "Qty to Pick," ItemInventory.QuantityOnHand as "Qty Available," ItemInventory.QuantityOnOrder as "Qty on Back Order" FROM SalesOrderLine, ItemInventory where SalesOrderLine.SalesOrderLineItemRefListID = ItemInventory.ListID and SalesOrderLine.IsFullyInvoiced = FALSE and SalesOrderLine.SalesOrderLineInvoiced &lt; SalesOrderLine.SalesOrderLineQuantity <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/BOItem/step1.png" alt="" border="0" /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Trying to update ItemInventoryAssemblyLine table ]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2775]]></link>
<guid isPermaLink="false"><![CDATA[4a5876b450b45371f6cfe5047ac8cd45]]></guid>
<pubDate><![CDATA[Mon, 09 May 2016 09:59:14 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Trying to update the ItemInventoryAssemblyLine table 
Problem Description:
All our products are Inventory Assemblies. I am using MS Access connected to QuickBooks via QODBC. I am using queries in MS Access to load/synchronize Inventor...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Trying to update the ItemInventoryAssemblyLine table </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">All our products are Inventory Assemblies. I am using MS Access connected to QuickBooks via QODBC. I am using queries in MS Access to load/synchronize Inventory data from my master inventory list, which is kept outside of QuickBooks, to make sure QuickBooks has the latest inventory data.<br /><br />I have successfully inserted ItemInventoryAssemblyLine entries, but now I'm trying to update the Quantity information on parts for existing assemblies. <br /><br />To do the update, I need to join a local table I've created from the external inventory data, which I've loaded with the ListID, ItemInventoryAssemblyLnItemInventoryRefListID, and FQPrimaryKey values from ItemInventoryAssemblyLine, in order to facilitate joins. <br /><br />Here's my SQL (from MS Access Query Designer): <br /><br />UPDATE ItemInventoryAssemblyLine INNER JOIN Assemblies_with_PK ON ItemInventoryAssemblyLine.FQPrimaryKey = Assemblies_with_PK.FQPrimaryKey SET ItemInventoryAssemblyLine.ItemInventoryAssemblyLnQuantity = [Qty]; <br /><br />"Qty" is a column in the local table with the updated Quantity that I'd like to edit into the QuickBooks table. <br /><br />When I run this query, I get the dreaded "Error parsing complete XML return string." error. I have tried alternatively joining on the combination of ListID and ItemInventoryAssemblyLnItemInventoryRefListID instead of FQPrimaryKey with the same result. <br /><br />I have updated Custom Fields in the parent ItemInventoryAssembly table using the same approach with no problems. <br /><br />Any help with this would be greatly appreciated!</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please update your QODBC to the latest QODBC version and test again.<br /><br />Please click <a href="http://www.qodbc.com/qodbcDownload.htm" target="_blank">here</a> to get the latest QODBC version. <br /><br />If you are still getting the same error after updating the version, I kindly request you to please raise a support ticket to the QODBC Technical Support department by clicking <a href="http://support.flexquarters.com/esupport/index.php?/Tickets/Submit" target="_blank">here</a>.<br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I update Customer custom fields]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2769]]></link>
<guid isPermaLink="false"><![CDATA[44ac09ac6a149136a4102ee4b4103ae6]]></guid>
<pubDate><![CDATA[Mon, 11 Apr 2016 12:00:52 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How do I update Customer custom fields 
Problem Description:
How do I update Customer custom fields?&nbsp;
Solution:
You can update Customer custom fields using the update query.For Example: Update Customer Set CustomFieldContract='...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How do I update Customer custom fields </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">How do I update Customer custom fields?</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can update Customer custom fields using the update query.<br /><br />For Example: <br />Update Customer Set CustomFieldContract='QODBCJOB1' where ListID='800000F2-1513344011' <br /> </span></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CustomFieldCreate/step1.png" alt="" /></p>
<p><br />And there you have it! To check that everything worked, just do the following:<br />Select ListID, Name, FullName, CustomFieldContract from Customer where ListID='800000F2-1513344011' <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CustomFieldCreate/step2.png" alt="" /></p>
<p><br />You can check it on QuickBooks, also. <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CustomFieldCreate/step3.png" alt="" /></p>
<p><br />You can insert Custom fields during Customer creation also. Please refer to the sample query for the same.<br /><br />INSERT INTO "customer" ("Name," "LastName," "FirstName," "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity," "BillAddressState," "BillAddressPostalcode," "CustomFieldBDay," "CustomFieldContract," "CustomFieldSpousesName") values('Juniga, Daphne,' 'Juniga,' 'Daphne,' 'Daphne Juniga,' '561 W 4th St.', 'Carlsbad,' 'CA,' '92009', '26/01/1987', 'QODBCJOB1', 'Jack') <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CustomFieldCreate/step4.png" alt="" /></p>
<p><br />And there you have it! To check that everything worked, just do the following:<br />Select Name, CustomFieldBDay, CustomFieldContract, CustomFieldSpousesName from Customer where Name='Juniga, Daphne' <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CustomFieldCreate/step5.png" alt="" /></p>
<p><br />You can check it on QuickBooks, also. <br /><br /></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CustomFieldCreate/step6.png" alt="" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-ALL] Troubleshooting - Getting Error &quot;Index was outside the bounds of the array.&quot; When using Import/Export tool in SQL Server]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2768]]></link>
<guid isPermaLink="false"><![CDATA[f499d34bd87b42948b3960b8f6b82e74]]></guid>
<pubDate><![CDATA[Mon, 11 Apr 2016 11:55:09 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Getting Error "Index was outside the array bounds." When using the Import/Export tool in SQL Server 
Problem Description 1:
I recently installed QODBC to get data out of a QuickBooks company file, but I get this error: "Index was outs...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Getting Error "Index was outside the array bounds." When using the Import/Export tool in SQL Server </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description 1:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I recently installed QODBC to get data out of a QuickBooks company file, but I get this error: "Index was outside the bounds of the array." <br /><br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step1.png" alt="" /></span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description 2:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We are attempting to import tables into SQL Server, which we use as a staging environment. We are not doing any transformations, simply trying to copy the data from QuickBooks into SQL Server using the Import Wizard.&nbsp;Below is the&nbsp;screenshot of the error we receive when attempting to do so. Details of the configuration are provided below. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Source data (QuickBooks): Microsoft .NET provider for ODBC - QODBC 32-bit configured DSN with default settings. Destination Data ( SQL Server): Microsoft OLEDB provider for SQL Server </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We are attempting to import four tables for now. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">- Account, Class, Entity, Transactions</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The reported error below occurs for each table. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Error: Can not load the column attributes from the schema for the current provider descriptor.<br />- COLUMN_NAME<br />- TYPE_NAME<br />- COLUMN_SIZE<br />- DECIMAL_DIGITS<br />- COLUMN_SIZE</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step17.png" alt="" /></span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please follow the steps below to resolve this error:<br /><br />1. Go to Import Export Wizard by right-clicking on your SQL Server database, clicking on Task, &amp; Click on Import Data. <br /><br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step2.png" alt="" /></span></p>
<p><br /><br />2. Choose ODBC Data Source &amp; Enter DSN &amp; Connection String, and click "Next." <br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step3.png" alt="" /></span></p>
<p><br /><br />3. Choose Destination and click on "Next." <br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step4.png" alt="" /></span></p>
<p><br /><br />4. Choose the second option (Write a query to specify the data to transfer) and click "Next." <br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step5.png" alt="" /></span></p>
<p><br /><br />5. Write the query and click on "Next." You can change the table name &amp; question as per your requirement.<br />For Example: <br />Select * from the Account</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step6.png" alt="" /></span></p>
<p><br /><br />6. Change the destination table name to your requirement and click "Edit Mapping." <br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step7.png" alt="" /></span></p>
<p><br /><br />7. You must verify the date type of all columns from the "Type" column. <br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step8.png" alt="" /></span></p>
<p><br /><br />You need to make sure that you are not getting <strong>23</strong> in Type. You will get <strong>23</strong> date-type columns.<br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step9.png" alt="" /></span></p>
<p><br /><br />You need to replace <strong>23</strong>&nbsp;with the current&nbsp;<strong>date</strong> for all columns whose Type is <strong>23</strong> and click on "OK."</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step10.png" alt="" /></span></p>
<p><br /><br />8. Click on "next" until the finish. <br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step11.png" alt="" /></span></p>
<p><br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step12.png" alt="" /></span></p>
<p><br /><br />Save and Run Package.<br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step13.png" alt="" /></span></p>
<p><br /><br />Complete the Wizard.<br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step14.png" alt="" /></span></p>
<p><br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step15.png" alt="" /></span></p>
<p><br /><br />9. You can see the table data imported to SQL Server's local database table. <br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLDTS/step16.png" alt="" /></span></p>
<p><br />Keywords:&nbsp;<span class="kbtitlemain">How to use DTS to import QuickBooks Data into MS SQL Server</span></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I remove subtotals and blank lines in sp_report]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2766]]></link>
<guid isPermaLink="false"><![CDATA[045cf83ab0722e782cf72d14e44adf98]]></guid>
<pubDate><![CDATA[Thu, 31 Mar 2016 07:38:09 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How do I remove subtotals and blank lines in sp_report 
Problem Description:
I'm trying to link a general ledger report in Excel. I've created the sp_report SQL query in Microsoft Query just fine, but the data it returns contains subt...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How do I remove subtotals and blank lines in sp_report </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I'm trying to link a general ledger report in Excel. I've created the sp_report SQL query in Microsoft Query just fine, but the data it returns contains subtotals and blank lines. I know I can write a script/filter in Excel to eliminate these lines, but I can't figure out what parameters to use to do it using QODBC.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/blank/step1.png" alt="" /><br /></span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">In QODBC, you can remove subtotals and blank lines in sp_report by adding the following condition. <br /><br /> <strong>where RowType='DataRow'</strong><br /><br /> For example:<br /><br /> sp_report ProfitAndLossDetail show TxnType, Date, RefNumber, Name, Memo, ClearedStatus, SplitAccount, Debit, Credit, RunningBalance parameters DateMacro = 'ThisYearToDate' where RowType='DataRow' <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/blank/step2.png" alt="" /><br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Upgrading to QuickBooks and QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2765]]></link>
<guid isPermaLink="false"><![CDATA[370bfb31abd222b582245b977ea5f25a]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 14:12:01 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Upgrading to QuickBooks and QODBC 
Problem Description:
I have a custom program written in Access 2003 communicating with QuickBooks 2013 using QODBC 13, which works fine. Will upgrading to the latest QuickBooks and QODBC require any ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Upgrading to QuickBooks and QODBC </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I have a custom program written in Access 2003 communicating with QuickBooks 2013 using QODBC 13, which works fine. Will upgrading to the latest QuickBooks and QODBC require any code changes to the Access 2003 program? <br /> </span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We are upgrading from QuickBooks Pro 2011 to QuickBooks Enterprise (the latest) and need a developer/consultant to assist in checking/upgrading queries and code to work with the new versions of QODBC/QuickBooks. Our company uses the QODBC Driver for QuickBooks to synchronize data between our Microsoft Access database and QuickBooks. We push customers, jobs, cheques, and items from Access to QuickBooks and pull data from QuickBooks to Access for reports.&nbsp;</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> It is unlikely that you will have a problem as QODBC is upward compatible with QuickBooks, so the same queries you have running now should continue to work. <br /><br /> Suggest you purchase the latest version of QODBC, which supports the newest version of QuickBooks, then run some tests. If you have any trouble with connections, please refer to the following:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2512" target="_blank">Connecting QODBC Driver to QuickBooks for the First Time (Video)</a><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2468" target="_blank">How to Use QODBC with Microsoft Access 2010 to Build Linked Table(32-Bit)</a><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2435" target="_blank">How to Configure QODBC to Work With 64-bit MS Access</a><br /> <br />Or Raise a <a href="http://support.flexquarters.com/esupport/index.php?/Tickets/Submit" target="_blank">Support Ticket</a> <br /><br /> There shall be no code change required in your MS-Access Application/Queries, and it should be able to work with the latest QuickBooks &amp; QODBC. <br /><br /> <strong>Additional Information:</strong><br /> With every release of QuickBooks/QODBC, new fields or features might be added. If you want to leverage the new areas, you will have to re-link the tables in Access. Refer: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2679" target="_blank">How to Re-Link QuickBooks Data in MS Access using QODBC</a>.<br /><br />Please refer to the link below for details about the updated QODBC table &amp; report schema and the relation between tables. You will also get information on each report column parameter that is supported. You can also view all table/column details.<br /><br /> Please refer to QODBC <a href="http://qodbc.com/schema.htm" target="_blank">Data Layout</a> for more details.<br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to use Between in QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2764]]></link>
<guid isPermaLink="false"><![CDATA[98d8a23fd60826a2a474c5b4f5811707]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 10:39:19 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How to use Between in QODBC 
Problem Description:
I need to use Between, in a range of dates, to return new customers in one period. I try this:  SELECT FullName FROM Customer Where TimeCreated Between {d'2007-12-18'} AND {d'2007-12-1...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How to use Between in QODBC </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I need to use Between, in a range of dates, to return new customers in one period. I try this: <br /><br /> SELECT FullName FROM Customer Where TimeCreated Between {d'2007-12-18'} AND {d'2007-12-19'} AND SalesRepRefFullName='PD' <br /><br />Is the use of QODBC correct?</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The use of BETWEEN here is fine. It's just TimeCreated is a TIMESTAMP, not a date. It should be: <br /><br /> SELECT FullName FROM Customer Where TimeCreated Between {ts'2007-12-18 00:00:00.000'} AND {ts'2007-12-19 00:00:00.000'} AND SalesRepRefFullName='PD' </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - ODBC driver doesn't support this statement. Updating existing record]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2763]]></link>
<guid isPermaLink="false"><![CDATA[f804d21145597e42851fa736e221da3f]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 10:35:27 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - ODBC driver doesn't support this statement. Updating existing record 
Problem Description:
I'm trying to make Inventory Items inactive after a sale programmatically or Active after voiding a sale. I thought the following SQL statement...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - ODBC driver doesn't support this statement. Updating existing record </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I'm trying to make Inventory Items inactive after a sale programmatically or Active after voiding a sale.<br /><br /> I thought the following SQL statement would have worked fine, but I got error 214217887(80040e21), saying the ODBC driver doesn't support this statement.<br /><br /> sSQL = "UPDATE ItemInventory SET ItemInventory.IsActive = True " &amp; _<br /> "WHERE (((ItemInventory.ListID)='ED0000-1173904787'))"</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">QODBC doesn't support the Table name used in the SET columns. So you need to remove the table name before the column name in the SET condition. For example:<br /><br /> sSQL = "UPDATE ItemInventory SET IsActive = True " &amp; _<br /> "WHERE (((ListID)='ED0000-1173904787'))" <br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I get Table Record Count fastest way using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2762]]></link>
<guid isPermaLink="false"><![CDATA[2b6921f2c64dee16ba21ebf17f3c2c92]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 10:33:07 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How do I get Table Record Count the fastest way using QODBC 
Problem Description:
What is the fastest way to get the number of records from a table?&nbsp;
Solution:
QODBC would need to scan the whole table to get the record or row c...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How do I get Table Record Count the fastest way using QODBC </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">What is the fastest way to get the number of records from a table?</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">QODBC would need to scan the whole table to get the record or row count. So you shouldn't do it if you don't need to. If you must do it, run the query against the optimized table using nosync like this: <br /><br />SELECT count(listid) as "Table Row Count" from Customer nosync<br /> <br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How can I get Last Items sold to customer details]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2759]]></link>
<guid isPermaLink="false"><![CDATA[35c5a2cb362c4d214156f930e7d13252]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 10:22:39 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How can I get the Last Items sold to the customer's details 
Problem Description:
I created a report using a custom set with the customer as the parent and InvoiceLine as the child, giving me items ordered in the past. My problem is t...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How can I get the Last Items sold to the customer's details </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I created a report using a custom set with the customer as the parent and InvoiceLine as the child, giving me items ordered in the past. <br /><br />My problem is that I only want the last time an item was ordered and want to eliminate some things, such as shipping.<br /><br />When I try to filter out items like shipping, it also takes out any invoice line items.<br /><br />I'm at a complete loss when it comes to getting only the last time an item was ordered.&nbsp;</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can get items ordered by a customer, in part name order, with the last date ordered first,t by using the below query:<br /><br />SELECT TxnDate, InvoiceLineItemRefFullName, sum(InvoiceLineQuantity) as Qty FROM InvoiceLine WHERE CustomerRefFullName='Cook, Brian: Kitchen' and InvoiceLineItemRefFullName is not null Group by InvoiceLineItemRefFullName, TxnDate Order by InvoiceLineItemRefFullName, TxnDate desc <br /><br /> <img src="//support.flexquarters.com/esupport/newimages/Sold/step1.png" alt="" border="0" /><br /><br />Or for the last time an item was ordered by a customer:<br /><br />SELECT Top 1 TxnDate, InvoiceLineItemRefFullName, sum(InvoiceLineQuantity) as Qty FROM InvoiceLine WHERE CustomerRefFullName='Cook, Brian:Kitchen' and InvoiceLineItemRefFullName = 'Appliance' Group by InvoiceLineItemRefFullName, TxnDate Order by InvoiceLineItemRefFullName, TxnDate desc<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/Sold/step2.png" alt="" border="0" /><br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to extract printed checks information using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2758]]></link>
<guid isPermaLink="false"><![CDATA[7f141cf8e7136ce8701dc6636c2a6fe4]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 10:19:01 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How to extract printed checks information using QODBC 
Problem Description:
We are involved in a new project with our bank involving a 'Positive Payment' solution that requires I send them a file with the check summary data each time ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How to extract printed checks information using QODBC </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We are involved in a new project with our bank involving a 'Positive Payment' solution that requires I send them a file with the check summary data each time we do a check printing run. The example layout I received from this looks like this: (best viewed with a fixed font) <br /><br />----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8<br /><br />RECONCILIATIONHEADER0075207990012345600000001000000005<br />20799001234560000071909000005100020040512 Abelman, Frayne &amp; Schwab<br />20799001234560000071910000000200020040512 American Express <br />20799001234560000071911000000200020040512 Arizona Dept. of Revenue <br />20799001234560000071912000000200020040512 Arrow Electronics Inc. <br />20799001234560000071913000000200020040512 ASCOM Hasler Mailing Sys<br /><br />I can manage the formatting if I can get the data into Access, but I need to grab the check number, check amount, issue date, void indicator, if that's available, and the payee name. <br /><br />Can I do this?</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">If you are paying bills each day and printing them in a daily batch, then you can try looking at the following: <br /><br />SELECT RefNumber, Amount, TxnDate, Memo, PayeeEntityRefFullName FROM BillPaymentCheck where BankAccountRefFullname='Checking' and IsToBePrinted is NULL and TxnDate={fn CURDATE()} <br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Correlated subqueries in UPDATE Statement]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2757]]></link>
<guid isPermaLink="false"><![CDATA[d58e2f077670f4de9cd7963c857f2534]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 10:16:55 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Correlated subqueries in the UPDATE Statement 
Problem Description:
I want to update the salesrep field in my existing invoices. I want to use the salesrep value stored in the Customer file. I would normally do this in SQL using a cor...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Correlated subqueries in the UPDATE Statement </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I want to update the salesrep field in my existing invoices. I want to use the salesrep value stored in the Customer file. I would normally do this in SQL using a correlated subquery. When I run the following query: update Invoice set SalesReprefFullName = (select SalesRepRefFullName from Customer where Invoice.CustomerrefFullName = Company.FullName), I get the following error: [QODBC] Expected lexical element not found:</span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Sorry, even your nested SELECT statement is invalid. It would be best if you always referenced the TxnID for all update operations using QODBC. For example, for Invoices, the update operation would look like this: <br /><br />Update Invoice set SalesRepRefListID='10000-1197757777' where Invoice.TxnID='2B55-1071523067' <br /><br />Where:<br /><br />SalesRepRefListID is the List ID for an existing Sales Representative from the SalesRep table.<br />TxnID is the Transaction ID for the existing Invoice from the Invoice table.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-ALL] How to Import data to QuickBooks through CSV using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2753]]></link>
<guid isPermaLink="false"><![CDATA[9dc372713683fd865d366d5d9ee810ba]]></guid>
<pubDate><![CDATA[Wed, 30 Mar 2016 09:57:29 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ How to Import data to QuickBooks through CSV using QODBC
Note: QODBC does not support direct import, but you can write VBA code that reads a CSV / Excel file &amp; generates insert statements.
There are two ways to import data to QuickBooks through CSV...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> How to Import data to QuickBooks through CSV using QODBC</span></h2>
<p><strong>Note</strong>: QODBC does not support direct import, but you can write VBA code that reads a CSV / Excel file &amp; generates insert statements.</p>
<p>There are two ways to import data to QuickBooks through CSV using QODBC.</p>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> 1) Using Wizard</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Create a new MS Access Database file &amp; link the Customer table.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please refer to&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2470" target="_blank">Using QuickBooks Data with Access 2016 / 365 / 2013 32-bit</a> for linking the Customer table.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step7.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Go to the "External Data" tab on Microsoft Access, as shown in the screenshot below, and click on the "Text File."</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step8.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The "Get External Data" screenshot will be shown below. Select the CSV file by clicking the "Browse" button. (*Note: the file name must be less than 64 characters. Otherwise, Microsoft Access will not be able to import it. Choose the second option. Append the copy of the records to the table.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step9.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Next, select the option "Delimited - Characters such as comma or tab separate each field," as shown in the screenshot below, and click "Next."</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step10.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Next, make sure "Comma" is selected in the "Choose the delimiter that separates your fields" and the double quotes symbol "s selected in the "Text Qualifier" as shown in the screenshot below, and click "Next" to continue.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step11.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Now, click on the Advanced button to configure import fields.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step12.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Now write the field name you want to insert from the CSV file &amp; click OK.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step13.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Click Finish to complete the import process.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step14.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Import Done. Customer data from CSV is inserted into the QuickBooks customer table.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step15.png" alt="" /></span></p>
<h3>&nbsp;</h3>
<p>Or</p>
<h3>&nbsp;</h3>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">2) Using VBA Code</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please refer to&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2571" target="_blank">Using QuickBooks Data with VBA</a></span></p>
<p>In this tutorial, we are showing a sample VBA script inserting Customer &amp; Invoice.</p>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Importing Customer to QuickBooks through CSV file using QODBC &amp; Microsoft Access VBA</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We have a Customer CSV file with Customer Name, Company Name, Phone &amp; Email fields.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We will import these fields to QuickBooks using VBA. You can see the records below from the Customer CSV file.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step1.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please refer to the sample VBA code for Importing Customers to QuickBooks through a CSV file using QODBC.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">By clicking on the "Add Customer" button, the Customer list in a CSV file will be imported into QuickBooks using QODBC.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step2.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step3.png" alt="" /></span></p>
<p><strong>Please Note: You need to change the CSV file location &amp; VBA script according to your CSV file location &amp; file data.</strong></p>
<p>Please refer to the code below code which is used in this example:<br /><br /> <strong>Import Customer:</strong></p>
<p>&nbsp;</p>
<p>Option Compare Database<br /><br />Public Sub exampleCsvImportCustomer()<br /><br />Dim oConnection As New ADODB.Connection<br />Dim sConnectString<br />Dim MyArray As Variant<br />Dim fso As Variant<br />Dim objStream As Variant<br />Dim objFile As Variant<br />Dim sSQL As String<br />Dim sMsg<br />Dim rs<br />Dim I As Integer<br />i = 0<br />sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"</p>
<p>'' For 64-bit use this one--&gt;sConnectString = "DSN=<strong>QuickBooks Data 64-bit QRemote</strong>;"</p>
<p>sSQL = "SELECT * FROM customer"<br /><br />Set rs = New ADODB.Recordset<br />oConnection.Open (sConnectString)<br />rs. Open sSQL, Connection, adopt dynamic, adLockOptimistic<br /><br />Set fso = CreateObject("Scripting.FileSystemObject")<br /><br />If fso.FileExists("C:\Input\Customer.csv") Then<br />Set objStream = fso.OpenTextFile("C:\Input\Customer.csv", 1, False, 0)<br />End If<br /><br />Do While Not objStream.AtEndOfStream<br />strLine = objStream.ReadLine<br />ReDim MyArray(0)<br />MyArray = Split(strLine, ",")<br />rs.AddNew<br />rs("Name") = MyArray(0)<br />rs("CompanyName") = MyArray(1)<br />rs("Phone") = MyArray(2)<br />rs("Email") = MyArray(3)<br />rs.Update<br />i = i + 1<br /><br />Loop<br /><br />sMsg = sMsg &amp; "Customer Added!!!"<br />MsgBox sMsg<br /><br />End Sub</p>
<p>Please Note: If you have a 64-bit application, then you need to use QRemote 64-bit DSN "<strong>QuickBooks Data 64-bit QRemote</strong>" (i.e., sConnectString = "DSN=<strong>QuickBooks Data 64-bit QRemote</strong>; OLE DB Services=-2;")</p>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Importing Invoice to QuickBooks through CSV file using QODBC &amp; Microsoft Access VBA</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We have an Invoice CSV file with CustomerRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineQuantity, InvoiceLineSalesTaxCodeRefListID &amp; FQSaveToCache fields.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">In this example, we are creating two Invoices, each having 3 invoice lines. We will import these fields into QuickBooks using VBA. You can see the records below from the Invoice CSV file.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step4.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please refer to the sample VBA code for Importing Invoices to QuickBooks through a CSV file using QODBC.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">By clicking the "Add Invoice" button, the Invoice list in a CSV file will be imported into QuickBooks using QODBC.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step5.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/CSV/step6.png" alt="" /></span></p>
<p><strong>Please Note: You need to change the CSV file location &amp; VBA script according to your CSV file location &amp; file data.</strong></p>
<p>Please refer to the code below code which is used in this example:<br /><br /> <strong>Import Invoice:</strong></p>
<p>&nbsp;</p>
<p>Option Compare Database<br /><br />Public Sub exampleCsvImportInvoice()<br />Dim oConnection As New ADODB.Connection<br />Dim sConnectString<br />Dim MyArray As Variant<br />Dim fso As Variant<br />Dim objStream As Variant<br />Dim objFile As Variant<br />Dim sSQL As String<br />Dim rs<br />Dim sMsg<br />Dim I As Integer<br />i = 0<br /><br />sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"</p>
<p>'' For 64-bit use this one--&gt;sConnectString = "DSN=<strong>QuickBooks Data 64-bit QRemote</strong>;"</p>
<p>sSQL = "SELECT * FROM InvoiceLine"<br /><br />Set rs = New ADODB.Recordset<br />oConnection.Open (sConnectString)<br />rs.Open sSQL, oConnection, adOpenDynamic, adLockOptimistic<br /><br />Set fso = CreateObject("Scripting.FileSystemObject")<br /><br />If fso.FileExists("C:\Input\Invoice.csv") Then<br />Set objStream = fso.OpenTextFile("C:\Input\Invoice.csv", 1, False, 0)<br />End If<br /><br />Do While Not objStream.AtEndOfStream<br />strLine = objStream.ReadLine<br />ReDim MyArray(0)<br />MyArray = Split(strLine, ",")<br />rs.AddNew<br />rs("CustomerRefListID") = MyArray(0)<br />rs("RefNumber") = MyArray(1)<br />rs("InvoiceLineItemRefListID") = MyArray(2)<br />rs("InvoiceLineDesc") = MyArray(3)<br />rs("InvoiceLineRate") = MyArray(4)<br />rs("InvoiceLineQuantity") = MyArray(5)<br />rs("InvoiceLineSalesTaxCodeRefListID") = MyArray(6)<br />rs("FQSaveToCache") = MyArray(7)<br />rs.Update<br />i = i + 1<br /><br />Loop<br /><br />sMsg = sMsg &amp; "Invoice Added!!!"<br />MsgBox sMsg<br /><br />End Sub</p>
<p>Please Note: If you have a 64-bit application, then you need to use QRemote 64-bit DSN "<strong>QuickBooks Data 64-bit QRemote</strong>" (i.e., sConnectString = "DSN=<strong>QuickBooks Data 64-bit QRemote</strong>; OLE DB Services=-2;")</p>
<p><a href="http://support.flexquarters.com/esupport/newimages/CSV/VBA-CSV.zip"><span style="font-family: Arial,Helvetica,sans-serif;"> Download Sample</span></a></p>
<p>Also, Refer: <br /><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2439" target="_blank">QODBC Reports Architecture Mismatch Problem When connecting</a></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to stop any query on VB Demo Application]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2749]]></link>
<guid isPermaLink="false"><![CDATA[d37b3ca37106b2bfdeaa12647e3bb1c9]]></guid>
<pubDate><![CDATA[Thu, 10 Mar 2016 12:34:31 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How to stop any query on the VB Demo Application 
Problem Description:
How to stop any query on VBDEMO when it takes time. How to convert the date to a QuickBooks date. I want to insert TxnDate in the ReceivePayment table, but it pops...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How to stop any query on the VB Demo Application </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">How to stop any query on VBDEMO when it takes time. <br /><br />How to convert the date to a QuickBooks date. <br /><br />I want to insert TxnDate in the ReceivePayment table, but it pops up the operator and operand error. <br /><br />I am just inserting values in the ReceivePayment Table. My Query is:<br /><br />INSERT INTO ReceivePayment (CustomerRefListID, ARAccountRefListID,txndate, RefNumber, PaymentMethodRefFullName, Memo, DepositToAccountRefListID, TotalAmount, IsAutoApply) VALUES ('B480000-1171302186', '3C0000-1164634404', '2007-02-12', '10667', 'SECPAY,' '72465', '80000-1164634403',54.04, TRUE) <br /><br />I am looking for your early reply with thanks.</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can stop query execution by clicking "Stop Query" from the QODBC Icon on the system tray. Right-click on the QODBC Icon in the system tray and click on "Stop Query" for 5 or 10 minutes. <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SVBD/step1.png" alt="" border="0" /> <br /><br />If the above does not work, and you need to close VB Demo, use Alt-Ctrl-Del and the Windows Task Manager to end the VB Demo application task:<br /><br /> <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SVBD/step2.png" alt="" border="0" /> <br /><br />QODBC uses the standard SQL date format: {d'YYYY-MM-DD'}. You will get an Invalid operand for operator error when you provide the wrong data type values in your query. Please refer to&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2734" target="_blank">Troubleshooting - [QODBC] Invalid operand for operator</a><br /><br />INSERT INTO ReceivePayment (CustomerRefListID, ARAccountRefListID,txndate, RefNumber, PaymentMethodRefFullName, Memo, DepositToAccountRefListID, TotalAmount, IsAutoApply) VALUES ('B480000-1171302186', '3C0000-1164634404', {d'2007-02-12'}, '10667', 'SECPAY,' '72465', '80000-1164634403',54.04, TRUE)</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to COMPUTE sum without COMPUTE clause]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2748]]></link>
<guid isPermaLink="false"><![CDATA[1006ff12c465532f8c574aeaa4461b16]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 13:09:53 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How to COMPUTE sum without COMPUTE clause 
Problem Description:
The following selection gives me the correct data using DISTINCT, but how do I get a sum of it, which is what I need? Select distinct billtopayduedate, billtopayrefnumber...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How to COMPUTE sum without COMPUTE clause </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The following selection gives me the correct data using DISTINCT, but how do I get a sum of it, which is what I need? <br /><br />Select distinct billtopayduedate, billtopayrefnumber, and bill.vendorreffullname, billtopayamountdue, assetaccountreffullname from bill nosync, bill pay nosync, billitemline nosync, item nosync where account to pay. billtopaytxnid = bill. tuned and bill.ispaid=false and bill. txnid = billitemline. txnid and BillItemLine.ItemLineItemRefListID = Item.ListID and assetaccountreffullname like '%inventory%.' <br /><br />I want my SELECT statement to return one number: a sum of all the records in "Bill to Pay" where one or more corresponding line items in the expense line or item line are for inventory.</span></p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">In SQL, we do sum(column) and group by, for example: <br /><br />SELECT Employee.PayrollInfoClassRefFullName, sum(Transaction.Amount) as Amount FROM Transaction, Employee where Transaction.EntityRefListID=Employee.ListID and Transaction.TxnType='Paycheck' and (Transaction.TxnDate &gt;= {d'2017-01-01'} and Transaction.TxnDate &lt; {d'2018-01-01'}) Group by Employee.PayrollInfoClassRefFullName<br /><br />To total all the BillToPay amounts, you do the following:<br /><br />Select sum(BillToPayAmountDue) as OpenAPBalance from BillToPay.<br /><br />To total all the BillToPay amounts involving stock (inventory) only and not expenses, you do the following:<br /><br />Select sum(BillToPayAmountDue) as OpenInvtBalance from BillToPay, BillItemLine where BillToPay.BillToPayTxnID = BillItemLine.TxnID and BillItemLine.ItemLineSeqNo = 1 <br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I void an Invoice?]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2747]]></link>
<guid isPermaLink="false"><![CDATA[868b7df964b1af24c8c0a9e43a330c6a]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 13:06:45 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How do I void an Invoice? 
Problem Description:
I don't see any indicator in the Invoice table. How do I void an Invoice? And how do I query for invoices that have been voided?&nbsp;
Solution:
You can use SP_VOID just like you would...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How do I void an Invoice? </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I don't see any indicator in the Invoice table. How do I void an Invoice? And how do I query for invoices that have been voided?</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can use SP_VOID just like you would use DELETE. It will void the invoice instead of deleting it.<br /><br />For Example:<br /><br />SP_VOID FROM Invoice WHERE TxnID = '1B03F-1513346399' <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/VOID/step1.png" alt="" border="0" /><br /><br />You can use the query below to get a list of Voided Invoices.<br /><br />Select RefNumber, CustomerRefFullName, and Memo from Invoice, like 'VOID:%.'<br /><br />If no InvoiceLine is returned, you can resync your optimized InvoiceLine table by running:<br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/VOID/step2.png" alt="" border="0" /><br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I get Timeframe information - Sales by Hour reporting using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2746]]></link>
<guid isPermaLink="false"><![CDATA[d37124c4c79f357cb02c655671a432fa]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 13:02:42 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How do I get Timeframe information - Sales by Hour reporting using QODBC 
Problem Description:
This is a no-technical question, but one I need to answer myself before jumping into QODBC. I'm considering working with QODBC to get the i...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How do I get Timeframe information - Sales by Hour reporting using QODBC </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">This is a no-technical question, but one I need to answer myself before jumping into QODBC. I'm considering working with QODBC to get the information we can't get easily from QuickBooks reports. I want to ask people working with QODBC, QuickBooks, and QuickBooks POS if QODBC can access and work with information related to the time of purchases. For example, view items that sell the most at 11 AM or between 4 and 5 PM, and also see what those items are. I don't know if this information is located in the QuickBooks or the QuickBooks POS file. If someone could tell me if I could access this type of information, I could start working with QODBC. I would appreciate any help.</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can use the query below to get time frame information using QODBC.<br /><br />For Example: <br /><br />SELECT {fn HOUR(TimeCreated)} as Hour, SalesLineQuantity as Qty, Type, RefNumber as Num, SalesLineItemRefFullName as Item, SalesLineDesc as Memo, SalesLineRate as SalesPrice, SalesLineAmount as Amount, TimeModified, CustomFieldContract as Contract# FROM SalesLine NOSYNC where (TxnDate &gt;= {d'2007-12-01'} and TxnDate &lt;={d'2007-12-31'}) and {fn CONVERT( {fn HOUR(TimeCreated)}, SQL_VARCHAR)} = '22' and SalesLineType='Item' and SalesLineItemRefFullName is not null and SalesLineQuantity &gt; 0 order by SalesLineQuantity DESC, SalesLineItemRefFullName <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/2746/001-Test-Tool.png" alt="" width="633" height="398" border="0" /> <br /><br />Where '22' is the hour using a 24-hour format.<br />(TxnDate &gt;= {d'2007-12-01'} and TxnDate &lt;={d'2007-12-31'}) is the start and end date for the report <br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I delete orphaned InvoiceLine records?]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2745]]></link>
<guid isPermaLink="false"><![CDATA[531db99cb00833bcd414459069dc7387]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 12:56:01 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How do I delete orphaned InvoiceLine records? 
Problem Description:
The InvoiceLine table contains orphan records (the parent invoice record no longer exists). I tried:DELETE FROM Invoice WHERE TxnID = 'xxxx-xxxxxxxxx'The TxnID is sup...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How do I delete orphaned InvoiceLine records? </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The InvoiceLine table contains orphan records (the parent invoice record no longer exists). I tried:<br /><br />DELETE FROM Invoice WHERE TxnID = 'xxxx-xxxxxxxxx'<br /><br />The TxnID is supplied from a list before running the DELETE command.<br /><br />However, no records are deleted. What am I doing wrong?&nbsp;</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The first step is actually to check that there are orphaned InvoiceLines. I would hazard a guess that you have orphaned optimized InvoiceLine only and no real orphaned InvoiceLines in QuickBooks. Run the following query with the unoptimized tag using <strong>QODBC Test Tool</strong>:- <br /><br />SELECT TxnID, InvoiceLineTxnLineID, InvoiceLineDesc, InvoiceLineAmount, RefNumber FROM InvoiceLine unoptimized where RefNumber = 'YourRefNumber.'<br /><br />Where 'YourRefNumber' is the Reference to the Invoice.<br /><br />If no InvoiceLine is returned, you can resync your optimized InvoiceLine table by running:<br /><br />sp_optimizefullsync InvoiceLine<br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How can I get daily Bill Payment information?]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2744]]></link>
<guid isPermaLink="false"><![CDATA[5a45828dead8c065099cb653a2185df1]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 12:52:37 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
How can I get daily payment bill information? And how can I get daily Bill Payment information using QODBC, and how can I get these details?&nbsp;&nbsp;
Solution:
You can use the query below to get details about daily Bill Payments...]]></description>
<content:encoded><![CDATA[<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">How can I get daily payment bill information? And how can I get daily Bill Payment information using QODBC, and how can I get these details?&nbsp;</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can use the query below to get details about daily Bill Payments.<br /><br /> For Example:<br /><br /> SELECT DueDate, VendorRefFullName as Vendor, RefNumber as Ref, AmountDue as "Amt. Due" FROM Bill where IsPaid = 0 and DueDate &lt;= {d'2007-12-25'} order by DueDate <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2744/01.png" alt="" border="0" /></span></p>
<p><strong> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><strong><span style="font-family: Arial,Helvetica,sans-serif;">Or</span></strong></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can go straight to the BillToPay table like this.<br /><br /> SELECT BillToPay.BillToPayDueDate as "Date Due," Bill.VendorRefFullName as Vendor, BillToPay.BillToPayRefNumber as Ref, BillToPay.BillToPayAmountDue as "Amt. Due", BillToPay.CreditToApplyCreditRemaining as "Credit Remaining" FROM BillToPay, Bill where BillToPay.BillToPayTxnID = Bill.TxnID and BillToPay.BillToPayDueDate &lt;= {d'2007-12-25'} order by BillToPay.BillToPayDueDate<br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2744/02.png" alt="" border="0" /><br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How can I Get all the Records for a specified Year]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2743]]></link>
<guid isPermaLink="false"><![CDATA[22b1f2e0983160db6f7bb9f62f4dbb39]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 12:48:20 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How can I get all the Records for a specified Year 
Problem Description:
I need to compute a Year-to-Date total paid using the Invoice table. I'm working in MS-Access and need to run the following statement: SELECT SUM(Subtotal) FROM ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How can I get all the Records for a specified Year </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I need to compute a Year-to-Date total paid using the Invoice table. I'm working in MS-Access and need to run the following statement: <br /><br />SELECT SUM(Subtotal) FROM Invoice WHERE CustomerRefListID = 'some customer ID' AND IsPaid AND TimeCreated BETWEEN date1 AND date2&nbsp;</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can use the query below to get details about records for a specified Year. <br /><br />For Example:<br /><br />Select * from Invoice where {fn YEAR(TxnDate)} = 2017 <br /><br />For more details, refer to: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2203" target="_blank">How are dates formatted in SQL queries when using the QuickBooks generated timestamps</a>?</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How can I change the pricing and quantity of Items in an ItemGroup?]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2742]]></link>
<guid isPermaLink="false"><![CDATA[78f7d96ea21ccae89a7b581295f34135]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 12:44:34 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How can I change the pricing and quantity of Items in an ItemGroup? 
Problem Description:
How can I change the price of each item in a group? Is it possible? If yes, please give me an example.  
Solution:
The ItemInventory, ItemServ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How can I change the pricing and quantity of Items in an ItemGroup? </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">How can I change the price of each item in a group? Is it possible? If yes, please give me an example. <br /> </span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The ItemInventory, ItemService, and ItemOtherCharge item itself determines the price of an item within an ItemGroup. The cost of an ItemService item can be calculated using standard UPDATE statements, for example: <br /><br />For Example:<br /><br />Update ItemService Set SalesOrPurchasePrice=40 where Name='Floor Plans' <br /><br />You cannot change the price or quantity of individual item group lines within an Invoice. To do that, you should read the item group lines and write each item separately on separate invoice lines. You can, however, state the quantity of the item group itself.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Expenses written to BillExpenseLine are not showing as Billable when viewed in QuickBooks]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2741]]></link>
<guid isPermaLink="false"><![CDATA[cdcb2f5c7b071143529ef7f2705dfbc4]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 12:39:59 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Expenses written to BillExpenseLine are not showing as Billable when viewed in QuickBooks 
Problem Description:
The field ExpenseLineBillableStatus contains the status of the BillExpenseLine and uses the following stored procedure "sp...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Expenses written to BillExpenseLine are not showing as Billable when viewed in QuickBooks </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The field ExpenseLineBillableStatus contains the status of the BillExpenseLine and uses the following stored procedure "sp_columns" command in <strong>QODBC Test Tool</strong>: <br /><br />sp_columns BillExpenseLine <br /><br />shows the: ExpenseLineBillableStatus valid values as: |Billable|NotBillable|HasBeenBilled| <br /><br />However, the following insert failed:- <br /><br />INSERT INTO BillExpenseLine (VendorReflistid, APAccountRefFullName,txndate, RefNumber, ExpenseLineAccountRefFullname, ExpenseLineAmount, ExpenseLinememo, ExpenseLineBillableStatus, ExpenseLineTaxCodeReffullname, FQSaveToCache ) VALUES ('290000-1045709633', 'Accounts Payable', {d'2006-02-01'}, '111111', 'Boosters COGS', 244, '2 of 222233433 aaaaaabbbbbca', 'Billable', 'NCG',0) <br /><br />With an "Insert into a linked table, "BillExpenseLine failed with an error.</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">For the Billable, NotBillable, and HasBeenBilled flags to be used on a Bill Expense Line within QuickBooks, a Customer Job "ExpenseLineCustomerRefListID" must also be assigned. <br /><br />To create a BillExpenseLine with a "Billable" status using two SQL insert statements:<br /><br />Statement 1<br /><br />INSERT INTO "BillExpenseLine" ("ExpenseLineAccountRefListID," "ExpenseLineAmount," "ExpenseLineMemo," "ExpenseLineCustomerRefListID," "ExpenseLineBillableStatus," "ExpenseLineTaxCodeRefListID," "FQSaveToCache") VALUES ('270000-1045536344', 500.00, 'QODBC Expense Line Memo Test 1', '100000-1045537156', 'Billable,' 'C0000-1045536338', 1) <br /><br />Statement 2<br /><br />INSERT INTO "Bill" ("VendorRefListID," "APAccountRefListID," "TxnDate," "RefNumber," "TermsRefListID," "DueDate," "Memo") VALUES ('200000-1045537156', '3D0000-1045609540', {d'2006-02-02'}, '20061', '20000-1045536343', {d'2006-03-02'}, 'QODBC Bill Expense Memo Test') <br /><br />The key to this process is in the field named "FQSaveToCache." This field is not part of the table but is used as a flag to the QODBC driver. In the sequence above, you should note that the value of "FQSaveToCache" is set to 1 (trustworthy) in the first statement. <br /><br />A proper (1) setting of "FQSaveToCache" instructs QODBC to take the values from the INSERT statement and hold them for later processing, but not to save them to QuickBooks yet. When QODBC receives the final transaction where the cache is set to 0 (false) or not specified, as shown in the second statement, the contents of the current INSERT statement will be combined with all of the previous INSERT statements held in the cache for this connection and saved as a batch into QuickBooks. <br /><br />Note: The BillExpenseLine.ExpenseLineAccountRefListID must be an asset type. You cannot use a COGS (cost of goods sold) type account.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How do I create a Purchase Order using an Item Group using QODBC?]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2740]]></link>
<guid isPermaLink="false"><![CDATA[96f2b50b5d3613adf9c27049b2a888c7]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 12:35:44 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[An Example of PurchaseOrder Item Groups
Create an ItemGroup with Three Lines 
Note: Let's create a new item group example with three lines using QODBC. Note the FQSaveToCache field, set to True except on the last one.
First Line 
INSERT INTO "ItemGrou...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of PurchaseOrder Item Groups</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create an ItemGroup with Three Lines </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Note: Let's create a new <span id="a200f460-62ee-4a81-83f2-06ebe869415b" class="GINGER_SOFTWARE_mark">item group</span> <span id="7e475cf2-f41f-4383-aa02-30b2f2361276" class="GINGER_SOFTWARE_mark">example with</span> three lines using QODBC. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span id="025ca6af-16a8-43f7-87f0-ef0b28345310" class="GINGER_SOFTWARE_mark">True except</span> <span id="33404719-03d0-4312-ae4e-e410b0fb020d" class="GINGER_SOFTWARE_mark">on</span> the <span style="color: #ff0000;">last</span> one.</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">First Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name," "IsActive," "ItemDesc," "IsPrintItemsInGroup," "ItemGroupLineItemRefListID," "ItemGroupLineQuantity," "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 1', 1, 'Test Item Dec, 1, '8000009D-1481800631', 1.0, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2740/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name," "IsActive," "ItemDesc," "IsPrintItemsInGroup," "ItemGroupLineItemRefListID," "ItemGroupLineQuantity," "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 2', 1, 'Test Item Dec, 1, '670004-1044572237', 2.0, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2740/Q2.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third (Last) Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name," "IsActive," "ItemDesc," "IsPrintItemsInGroup," "ItemGroupLineItemRefListID," "ItemGroupLineQuantity," "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 3', 1, 'Test Item Dec, 1, '6D0003-1044572301', 3.0, <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2740/Q3.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The result looks like this in QuickBooks 2022:</span></p>
<p>&nbsp;</p>
<div>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2740/Q4.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">For more about creating ItemGroups, please see: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2172" target="_blank">How to generate Item Groups using QODBC</a>.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Locate the List ID of the New ItemGroup</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">To locate the ListID of the new Item Group (or any group), do the following: </span></p>
</div>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT ListID, Name, ItemDesc, IsActive FROM ItemGroup</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2740/Q5.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Invoice the ItemGroup </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: We can now create a PurchaseOrder using the item group by utilizing the ListID:<span style="color: #003366;">'<span style="color: #0000ff;">8000009F-1481791619</span>'</span> and making one simple QODBC insert statement below. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>PurchaseOrderLine</strong>" ("VendorRefListID," "RefNumber," "<span style="color: #0000ff;">PurchaseOrderLineGroupItemGroupRefListID,"&nbsp;</span>"<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('390000-1039739488', 'Group2', <span style="color: #003366;">'<span style="color: #0000ff;">8000009F-1481791619</span>'</span>, <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2740/Q6.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Result in QuickBooks </span></strong></span></p>
<p>When we look at the new invoice in QuickBooks 2013, we will see the following:</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2740/Q7.png" alt="" /></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>:</span><span style="font-family: Arial, Helvetica, sans-serif;"> Qty, Rate, and the Amount are shown as per Qty, Rate, and the Amount for the service or stock item</span></p>
<div id="kbratingcontainer">
<div class="kbrating">
<div class="kbratingstars">&nbsp;</div>
</div>
</div>
<hr class="kbhr" />]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How Do I List the Subtotal of Invoices within Date Range]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2739]]></link>
<guid isPermaLink="false"><![CDATA[56584778d5a8ab88d6393cc4cd11e090]]></guid>
<pubDate><![CDATA[Wed, 09 Mar 2016 12:27:25 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - How Do I List the Subtotal of Invoices within the Date Range 
Problem Description:
I want to list the subtotal of all Invoices by a customer for not only that particular customer but all jobs assigned to that customer within a specifi...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - How Do I List the Subtotal of Invoices within the Date Range </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I want to list the subtotal of all Invoices by a customer for not only that particular customer but all jobs assigned to that customer within a specified date range. <br /><br />What QODBC SQL Statement would I use? <br /><br />This is what I have so far: <br /><br />SELECT SUM(Subtotal) AS gt FROM Invoice WHERE CustomerRefListId='30000-1166980720' AND (TxnDate&gt;={d'2006-12-24'} AND TxnDate&lt;={d'2007-01-23'}) <br /><br />But that will only get me the subtotal of invoices for the primary customer, but it doesn't get me the combined subtotal of all the invoices for each job under that customer. <br /><br />Is there a way to combine it all into one SQL Statement? Or do I have to use multiple statements and then manually combine all the totals?</span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can use the query below to get the Subtotal of Invoices Within the Date Range using QODBC. <br /><br />You can run this query: <br /><br />SELECT Invoice.CustomerRefFullName, Sum(Invoice.SubTotal) AS SumOfSubTotal FROM Invoice WHERE (((Invoice.TxnDate)&gt;={d'2007-01-01'})) and (((Invoice.TxnDate)&lt;{d'2007-12-01'})) GROUP BY Invoice.CustomerRefFullName<br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Subtotal/step1.png" alt="" border="0" /> <br /><br />You can change the greater than or equal (&gt;=) and the less than (&lt;) dates to the date range you wish to use.<br /> <br /><br />If you want to get the SubTotal of all Invoices for Customer 2 and all the Customer 2 Jobs combined, I suggest you go straight to the QuickBooks reporting engine instead, which will add up and total things for you (including any credits). QuickBooks reports can be accessed using the QODBC stored report procedures: <br /><br />sp_report SalesByCustomerSummary show Text as Customer, Label as Job, Amount_1 as Total parameters DateFrom = {d'2007-01-01'}, DateTo= {d'2007-12-01'}, SummarizeColumnsBy = 'TotalOnly' <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Subtotal/step2.png" alt="" border="0" /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Invoice Line Rate is not loading into QuickBooks Online]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2735]]></link>
<guid isPermaLink="false"><![CDATA[1d49780520898fe37f0cd6b41c5311bf]]></guid>
<pubDate><![CDATA[Tue, 09 Feb 2016 12:50:22 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Invoice Line Rate is not loading into QuickBooks Online.
Problem Description:
The InvoiceLineRate value passed in the insert query to create the InvoiceLine record is not being loaded into QBO. Below are the two queries I am using to ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Invoice Line Rate is not loading into QuickBooks Online.</span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The InvoiceLineRate value passed in the insert query to create the InvoiceLine record is not being loaded into QBO. <br /><br />Below are the two queries I am using to create the invoice.<br /><br />Insert into "InvoiceLine" ("CustomerRefListID," "CustomerRefFullName," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineQuantity," "InvoiceLineRate," "InvoiceLineAmount," "FQSaveToCache") VALUES ('11', 'Alder Electric,' '19', 'Todd Gardner', 37.5, 42.50, 1593.75, 1) <br /><br />Insert into "Invoice" ("CustomerRefListID," "CustomerRefFullName," "TxnDate," "RefNumber," "BillAddressAddr1", "BillAddressAddr2", "BillAddressAddr3", "BillAddressAddr4", "BillAddressCity," "BillAddressState," "BillAddressPostalCode," "TermsRefListID," "TermsRefFullName," "DueDate")VALUES ('11', 'Alder Electric,' {d'2015-12-06'}, '1388', 'Alder Electric,' 'Dannon Alder,' '605 N 1250 W', '', 'Centerville,' 'UT,' '84014', '5', 'Due upon Receipt,' {d'2015-12-21'})</span>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">QODBC Online has the logic that if the user has provided Quantity, Rate &amp; Amount, QODBC will send Quantity &amp; Amount to QuickBooks. <br /><br />So you need to send Quantity &amp; Rate and remove Amount. The Amount will be auto-calculated.<br /><br />For Example:<br /><br />Insert into "InvoiceLine" ("CustomerRefListID," "CustomerRefFullName," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineQuantity," "InvoiceLineRate," "FQSaveToCache") VALUES ('11', 'Alder Electric,' '19', 'Todd Gardner', 37.5, 42.50, 1) <br /><br />Insert into "Invoice" ("CustomerRefListID," "CustomerRefFullName," "TxnDate," "RefNumber," "BillAddressAddr1", "BillAddressAddr2", "BillAddressAddr3", "BillAddressAddr4", "BillAddressCity," "BillAddressState," "BillAddressPostalCode," "TermsRefListID," "TermsRefFullName," "DueDate")VALUES ('11', 'Alder Electric,' {d'2015-12-06'}, '1388', 'Alder Electric,' 'Dannon Alder,' '605 N 1250 W', '', 'Centerville,' 'UT,' '84014', '5', 'Due upon Receipt,' {d'2015-12-21'})</span></p>
<h3>&nbsp;</h3>
<p>&nbsp;</p>
<p>Tags: QuickBooks Online, QBO, QODBC Online, invoice line rate, Quantity, Rate,&nbsp;invoice line amount, invoice line</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - [QODBC] Invalid operand for operator: &lt;assignment&gt;]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2734]]></link>
<guid isPermaLink="false"><![CDATA[7f7c351ee977c765aa8cd5c7020bc38f]]></guid>
<pubDate><![CDATA[Tue, 19 Jan 2016 10:31:14 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - [QODBC] Invalid operand for the operator: &lt;assignment&gt; 
Problem Description:
I am getting the error "Invalid operand for the operator: &lt;assignment&gt;" while trying to insert an invoice line item: INSERT INTO InvoiceLine ( Cu...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - [QODBC] Invalid operand for the operator: &lt;assignment&gt; </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I am getting the error "Invalid operand for the operator: &lt;assignment&gt;" while trying to insert an invoice line item: <br /><br />INSERT INTO InvoiceLine ( CustomerRefListID, TemplateRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineRate, InvoiceLineAmount, InvoiceLineTaxCodeRefListID, FQSaveToCache) VALUES ( '800019E1-1428688811', '8000001B-1360624407', '17003', '80000129-1362767268', 65.0000, '130.00', '80000002-1358615111', 0)<br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Operand/step1.png" alt="" border="0" /> </span></p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You will get an Invalid operand for operator error when you provide the wrong data type values in your query.<br /><br />For Example: <br /><br />The column data type is decimal/integer/bit &amp; you are inserting the value as a string/character. <br /><br />In your query, the InvoiceLineAmount column&nbsp;data type is decimal &amp; you provided the value as a string/character. <br /><br />Please refer to the sample query &amp; test again:<br /><br />INSERT INTO InvoiceLine ( CustomerRefListID, TemplateRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineRate, InvoiceLineAmount, InvoiceLineTaxCodeRefListID, FQSaveToCache) VALUES ( '800019E1-1428688811', '8000001B-1360624407', '17003', '80000129-1362767268', 65.0000, 130.00, '80000002-1358615111', 0)<br /><br />Please refer to QODBC <a href="http://qodbc.com/schema.htm" target="_blank">Data Layout</a> for more details.<br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Getting Unexpected extra token error in Date Field Query]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2726]]></link>
<guid isPermaLink="false"><![CDATA[b1c00bcd4b5183705c134b3365f8c45e]]></guid>
<pubDate><![CDATA[Mon, 11 Jan 2016 10:28:03 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - Getting Unexpected extra token error in Date Field Query 
Problem Description:
I am trying to query the Transaction table based on the TxnDate field.I tried the code below.OdbcCommand SourceCmd = new OdbcCommand("Select * from Transac...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - Getting Unexpected extra token error in Date Field Query </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I am trying to query the Transaction table based on the TxnDate field.<br /><br />I tried the code below.<br /><br />OdbcCommand SourceCmd = new OdbcCommand("Select * from Transaction where TxnDate &gt;= {d '2010-01-01'} and TxnDate &lt;= {d '" + DateTime.Now.ToString("yyyy-MM-dd") + "'} ", cnQODBC);<br /><br />I am getting this error:<br /><br />ERROR [42000] [QODBC] [sql syntax error] Expected lexical element not found: = <br /><br />And when&nbsp;I try this one:<br /><br />OdbcCommand SourceCmd = new OdbcCommand("Select * from Transaction where TxnDate &gt;= #2010-01-01# and TxnDate &lt;= #" + DateTime.Now.ToString("yyyy-MM-dd") + "# ", cnQODBC);<br /><br />I get this error:<br /><br />ERROR [42000] [QODBC] Unexpected extra token: #<br /><br />What is the correct format to pass the date values ??<br /><br />I am using C#.<br /> </span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Please refer to the article below for the date format in QODBC:<br /> <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2203">How are dates formatted in SQL queries when using the QuickBooks-generated timestamps</a><br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Online] Troubleshooting - Select statement is not working]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2722]]></link>
<guid isPermaLink="false"><![CDATA[33267e5dc58fad346e92471c43fcccdc]]></guid>
<pubDate><![CDATA[Mon, 11 Jan 2016 10:14:01 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - The select statement is not working.
Problem Description:
I am evaluating the product. When I made this SQL Statement:Select * from Customer where ListId=557.I was getting a column not found error. The QBO online documentation says th...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - The select statement is not working.</span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I am evaluating the product. When I made this SQL Statement:<br /><br />Select * from Customer where ListId=557.<br /><br />I was getting a column not found error. The QBO online documentation says the Customer table has a field called "Id," but this also comes back as "column not found."<br /><br />Can you let me know if this unique ID column is being renamed or something?<br /><br /> </span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> ListID column data type is varchar, so you need to add quotes (i.e.,') around it. Please use the query below &amp; try again.<br /><br />select * from Customer where ListId='557' <br /><br />Regarding ID, I think you might have tried</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">select * from Customer where ID='557' </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">ID is not part of the QODBC-Online Schema. Please use the listed.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can get the QODBC Online table schema from the link below:<br /><br />Please refer to QODBC Online <a href="http://doc.qodbc.com/qodbc/online/index.php" target="_blank">Data Layout</a> for more details:</span></p>
<h3>&nbsp;</h3>
<p>&nbsp;</p>
<p>Tags: QuickBooks Online, QBO, QODBC Online, Customer</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><br /><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - [QODBC] Error 3000 - The given object ID &quot;&quot; in the field &quot;list id&quot; is invalid]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2716]]></link>
<guid isPermaLink="false"><![CDATA[cdd96eedd7f695f4d61802f8105ba2b0]]></guid>
<pubDate><![CDATA[Mon, 21 Dec 2015 11:57:44 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Troubleshooting - [QODBC] Error 3000 - The given object ID "in the field "list id" is invalid 
Problem Description:
 I get a generic error when using QODBC to create an invoice. I am using the following query:INSERT INTO InvoiceLine ("TemplateRefListID...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Troubleshooting - [QODBC] Error 3000 - The given object ID "in the field "list id" is invalid </span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> I get a generic error when using QODBC to create an invoice. <br /><br />I am using the following query:<br /><br />INSERT INTO InvoiceLine ("TemplateRefListID," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineAmount," "InvoiceLineQuantity," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('80000011-1203804797', '80002C72-1345040417', 'My item 1',19.95, 1, '', 1)<br /><br />INSERT INTO InvoiceLine ("TemplateRefListID," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineAmount," "InvoiceLineQuantity," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('80000011-1203804797', '80003194-1404606055', 'My item 2',22.50, 1, '', 1)<br /><br />INSERT INTO Invoice ("TemplateRefListID," "CustomerRefListID," "CustomerRefFullName," "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity," "BillAddressState," "BillAddressPostalCode," "ShipAddressAddr1", "ShipAddressAddr2", "ShipAddressCity," "ShipAddressState," "ShipAddressPostalCode," "SalesRepRefFullName," "ShipMethodRefListID") VALUES ('80000011-1203804797', '80000440-1448981709', 'FAKEEBAY,' 'Someone,' 'Address 1 ', 'The city,' 'State,' 'Zip,' 'Someone,' 'Address 1', 'City,' 'State,' 'Zip,' 'Rep,' '80000004-1202486852') <br /><br />The error is:<br /><br />[QODBC] Error: 3000 - The given object ID "in the field "list id" is invalid.</span></p>
<p><br /><br /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/3000/step1.png" alt="" border="0" /></strong></span></p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> You are trying to insert a blank value for the field "InvoiceLineSalesTaxCodeRefListID."<br /><br />To resolve this issue, insert a valid value for the InvoiceLineSalesTaxCodeRefListID field or remove the InvoiceLineSalesTaxCodeRefListID field from your insert statement. <br /><br />Remove the LISTED field from the query. Example:<br />INSERT INTO InvoiceLine ("TemplateRefListID," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineAmount," "InvoiceLineQuantity," "FQSaveToCache") VALUES ('80000011-1203804797', '80002C72-1345040417', 'My item 1',19.95, 1, 1)<br /><br /> <br />Specify a value for LISTED field Example:<br />INSERT INTO InvoiceLine ("TemplateRefListID," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineAmount," "InvoiceLineQuantity," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('80000011-1203804797', '80002C72-1345040417', 'My item 1',19.95, 1, '90000011-1234567800', 1)<br /><br /> <br />So please insert a valid value in the InvoiceLineSalesTaxCodeRefListID field or remove the InvoiceLineSalesTaxCodeRefListID field from your insert query.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Insert information from MS Excel spreadsheet to QuickBooks using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2707]]></link>
<guid isPermaLink="false"><![CDATA[65f2a94c8c2d56d5b43a1a3d9d811102]]></guid>
<pubDate><![CDATA[Mon, 02 Nov 2015 13:05:56 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description: 
How to insert employee time information from an MS Excel time spreadsheet into QuickBooks using QODBC
Solution: 
You cannot perform insert/update operations directly in MS Excel because Excel is just exporting tables in the spread...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Problem Description: </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">How to insert employee time information from an MS Excel time spreadsheet into QuickBooks using QODBC</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Solution: </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You cannot perform insert/update operations directly in MS Excel because Excel is just exporting tables in the spreadsheet. Excel does not create link tables like MS Access. If you want to insert/update using MS Excel, then you need to use MS Query, which will execute the statement you enter in the editor, or you can write VBA code in Excel. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please refer to the article for how to write SQL statements using MS Query: <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2352" target="_blank">Microsoft Office with MS Query and QODBC</a>.</span></p>
<p>Note: In recent versions of Microsoft Excel (including Excel 365), the Microsoft Query (Legacy) feature is hidden by default from the Get Data tab.</p>
<p>Please refer to&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3092">Troubleshooting - How to enable Microsoft Excel 365 - Legacy Microsoft Query</a>.</p>
<p>You can use ADO in VB to connect to QuickBooks via VBA in MS Excel.</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please refer to the sample code for inserting records through VBA:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Sub test() <br />Const adopt static = 3<br />Const adLockOptimistic = 3<br /> <br />Dim oConnection<br />Dim oRecordset<br />Dim sMsg<br />Dim sConnectString<br />Dim sSQL<br /> <br />sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"<br />sSQL = "INSERT INTO TimeTracking (EntityRefListID, DurationMinutes, TxnDate, CustomerRefFullName, ItemServiceRefFullName, PayrollItemWageRefFullName) VALUES ( '370000-933272659', 480, {d'2007-12-18'}, 'Pretell Real Estate:75 Sunset Rd.', 'Removal,' 'Salary')." <br />Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")<br />oConnection.Open sConnectString<br />oConnection.Execute (sSQL)<br />sMsg = sMsg &amp; "Record Added!!!"<br />MsgBox sMsg<br />Set oRecordset = Nothing<br />Set oConnection = Nothing<br />End Sub</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please note: All query values are coming from sample company files. Please change it according to your company file value before using it.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please click here to <a href="http://support.flexquarters.com/esupport/newimages/TT/Insert Timetracking.xlsm">download a sample MS Excel file.</a></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How can I add blank InvoiceLine in QuickBooks using QODBC.]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2702]]></link>
<guid isPermaLink="false"><![CDATA[2e7ceec8361275c4e31fee5fe422740b]]></guid>
<pubDate><![CDATA[Fri, 30 Oct 2015 09:14:00 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
How can I add a blank InvoiceLine in QuickBooks using QODBC?
Solution:
You can create an empty Invoice, neither in QODBC nor QuickBooks. But in QuickBooks, you could leave lines blank and ensure at least one line with data in your ...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">How can I add a blank InvoiceLine in QuickBooks using QODBC?</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solution:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">You can create an empty Invoice, neither in QODBC nor QuickBooks. But in QuickBooks, you could leave lines blank and ensure at least one line with data in your invoice to create open line records.<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/BlInvoice/step1.png" alt="" /><br /><br /> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">You can create the same from QODBC by using the queries below. Please note you need to create one line of sufficient data. For the rest line, you can add a description &amp; keep other fields blank. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">When the line record is null, there will be no record for the newly created invoice, which is not allowed by QuickBooks.<br /><br />INSERT INTO InvoiceLine (CustomerRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount, InvoiceLineSalesTaxCodeRefListID, FQSaveToCache) VALUES ('670000-1071517519', '71099', '320000-1071525597', 'POWERTRAK-2000', 200.00000, 200.00, '20000-999022286',1) <br /><br />INSERT INTO InvoiceLine (InvoiceLineDesc, FQSaveToCache) VALUES ('POWERTRAK-3000', 1) <br /><br />INSERT INTO InvoiceLine (InvoiceLineDesc, FQSaveToCache) VALUES ('POWERTRAK-4000', 0) <br /><br /><img src="//support.flexquarters.com/esupport/newimages/BlInvoice/step2.png" alt="" /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to convert Bit to Integer using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2698]]></link>
<guid isPermaLink="false"><![CDATA[fb4ab556bc42d6f0ee0f9e24ec4d1af0]]></guid>
<pubDate><![CDATA[Mon, 26 Oct 2015 07:14:05 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to convert Bit to Integer using QODBC
Problem Description:
 I am trying to get our ODBC extension module interface working with QODBC. Everything seems to work fine except when trying to read SQL_BIT type fields. It causes the Scri...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to convert Bit to Integer using QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I am trying to get our ODBC extension module interface working with QODBC. Everything seems to work fine except when trying to read SQL_BIT type fields. It causes the Script BASIC interface to error out. <br /><br />I searched on Google about the issue, and others (Oracle, ...) have a similar problem. Do you have any way to translate the SQL_BIT type to a numeric or a CHAR(1)?<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You can convert the Bit field to an integer using the query below.<br /><br />For Example:<br /><br />In the Customer table, the IsActive field is of the Bit datatype. We will convert it to a numeric/integer using the following query:<br /><br />SELECT ListID, {fn CONVERT("IsActive", SQL_Integer)} AS "IsActive" FROM Customer<br /><br />[Script BASIC Code] <br /><br />IMPORT odbc. by<br /><br />dbh = odbc::RealConnect("QuickBooks Data","","")<br /><br />odbc::query(dbh,"SELECT FullName, AccountNumber, {fn CONVERT(\"IsActive \", SQL_Integer)} AS \"IsActive\", Balance FROM Account")<br /><br />FOR x = 1 to 5<br /><br />odbc::FetchHash(dbh,dbcol)<br /><br />PRINT Left(dbcol{"FullName"} &amp; STRING(50," "),50),"\t",dbcol{"AccountNumber"},"\t",dbcol{"IsActive"},"\t",FORMAT("% ~-###,###.00~",dbcol{"Balance"}),"\n" NEXT<br /><br />odbc::Close(dbh)<br /><br /> <br /></span></p>
<p>&nbsp;</p>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Online] Troubleshooting - How to change status of Invoice in QuickBooks Online]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2697]]></link>
<guid isPermaLink="false"><![CDATA[ab452534c5ce28c4fbb0e102d4a4fb2e]]></guid>
<pubDate><![CDATA[Mon, 26 Oct 2015 07:10:49 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to change the status of the Invoice in QuickBooks Online
Problem Description:
 I had inserted it into the table ReceivePaymentLine, but it does not change the status to "Paid." How do I do it?I use InvoiceLine to insert Item sales ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to change the status of the Invoice in QuickBooks Online</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I had inserted it into the table ReceivePaymentLine, but it does not change the status to "Paid." How do I do it?<br /><br />I use InvoiceLine to insert Item sales and ReceivePaymentLine for payment.<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You can change the Invoice status to paid by receiving payment for that Invoice. Please refer to the sample query for receiving payment.<br /><br />Insert into ReceivePaymentLine (CustomerRefListID, CustomerRefFullName, TxnDate, RefNumber, TotalAmount, PaymentMethodRefFullName, memo, DepositToAccountRefFullName, AppliedToTxnTxnID, AppliedToTxnPaymentAmount) values ('YourCustomerRefListID,' 'YourCustomerRefFullName,' 'YourTxnDate,'' RefNumber which you want to use, YourTotalAmount, 'YourPaymentMethodRefFullName,' 'Yourmemo,' 'YourDepositToAccountRefFullName,' 'TxnID of Invoice,' 'Invoice Amount')<br /><br />AppliedToTxnTxnID = TxnID of Invoice<br /><br />AppliedToTxnPaymentAmount = Invoice Amount<br /><br />For Example:<br /><br />Insert into ReceivePaymentLine (CustomerRefListID, CustomerRefFullName, TxnDate, TotalAmount, PaymentMethodRefFullName, memo, DepositToAccountRefFullName, AppliedToTxnTxnID, AppliedToTxnPaymentAmount) values ('1951', 'CSS Online,' {d'2013-02-05'}, '1044',40.00,' Cash,' 'Payment 2914', 'Undeposited Funds,' '3994',40.00) <br /><br /> <br /><br /><img src="//support.flexquarters.com/esupport/newimages/QBOStChng/step1.png" alt="" /><br /><br /></span></p>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to get Conversion Ratio information from UnitOfMeasureSetRelatedUnit Table in QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2692]]></link>
<guid isPermaLink="false"><![CDATA[d790c9e6c0b5e02c87b375e782ac01bc]]></guid>
<pubDate><![CDATA[Mon, 26 Oct 2015 05:59:00 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How to get Conversion Ratio information from the UnitOfMeasureSetRelatedUnit Table in QODBC
Conversion ratio information is stored in a table called UnitOfMeasureSetRelatedUnit.
Problem:
How to get Conversion Ratio information from the UnitOfMeasureSet...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How to get Conversion Ratio information from the UnitOfMeasureSetRelatedUnit Table in QODBC</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Conversion ratio information is stored in a table called UnitOfMeasureSetRelatedUnit.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">How to get Conversion Ratio information from the UnitOfMeasureSetRelatedUnit Table in QODBC.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solution:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">We can get conversion ratio information by using an INNER JOIN on the SalesOrderLine Table. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">We can get conversion ratio information by comparing UnitOfMeasureSetRelatedUnit.ListID and SalesOrderLine.ListID </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Please refer to the below-mentioned query for conversion ratio information: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Select S.RefNumber, S.TxnDate, S.SalesOrderLineItemRefFullName, S.SalesOrderLineQuantity,<br />S.SalesOrderLineRate, U.UnitOfMeasureType, U.Name, U.BaseUnitName, U.RelatedUnitName,<br />U.RelatedUnitConversionRatio From UnitOfMeasureSetRelatedUnit U<br /> INNER JOIN SalesOrderLine S ON S.SalesOrderLineOVerrideUOMSetRefListID = U.ListID</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - QODBC Driver dropping a few transactions on insert to InvoiceLines]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2689]]></link>
<guid isPermaLink="false"><![CDATA[577fd60255d4bb0f466464849ffe6d8e]]></guid>
<pubDate><![CDATA[Thu, 08 Oct 2015 09:06:20 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - QODBC Driver dropping a few transactions on insert to InvoiceLines
Problem Description:
We seem to have an issue with an insert into the InvoiceLines table, dropping a few transactions. We need to create about 1000 invoices per month, ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - QODBC Driver dropping a few transactions on insert to InvoiceLines</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">We seem to have an issue with an insert into the InvoiceLines table, dropping a few transactions. <br /><br />We need to create about 1000 invoices per month, with an average of about 6 - 7 lines per invoice. As QuickBooks cannot handle a set-based insert, we have used a cursor to insert the invoice lines and generate an invoice customer by customer (using the FQSaveToCache flag as the trigger. The code is as follows:<br /><br />SET COUNT ON<br /><br />DECLARE curOutput CURSOR FOR SELECT CustomerRefListID, TemplateRefListID, TxnDate, TermsRefListID, CustomerMsgRefListID, InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, FQSavetoCache FROM dbo.QBQODBC_INVOICEPOSTINGDATA WHERE CustomerRefListID IS NOT NULL ORDER BY CustomerRefListID, FQSavetoCache DESC<br />DECLARE @CustomerID VARCHAR(100)<br />DECLARE @TemplateID VARCHAR(100)<br />DECLARE @TransactionDate DATETIME<br />DECLARE @CustomerTermsID VARCHAR(100)<br />DECLARE @CustomerMsgID VARCHAR(100)<br />DECLARE @ItemID VARCHAR(100)<br />DECLARE @Quantity DECIMAL(18,2)<br />DECLARE @Rate DECIMAL(18,2)<br />DECLARE @Amount DECIMAL(18,2)<br />DECLARE @QBFlag INT<br />DECLARE @i INT<br />SET @i = 0<br /><br />OPEN curOutput<br />FETCH NEXT<br />FROM curOutput<br /><br />INTO @CustomerID,@TemplateID,@TransactionDate,@CustomerTermsID,@CustomerMsgID,@ItemID,@Quantity,@Rate,@Amount,@QBFlag; --Subroutine for QB insert<br />WHILE @@FETCH_STATUS = 0<br /><br />BEGIN<br />INSERT INTO QREMOTE...INVOICELINE (CustomerRefListID, TemplateRefListID, TxnDate, TermsRefListID, CustomerMsgRefListID, InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, FQSaveToCache)<br />VALUES( @CustomerID, @TemplateID, @TransactionDate, @CustomerTermsID, @CustomerMsgID, @ItemID, @Quantity, @Rate, @Amount, @QBFlag )<br />SET @i = @i + 1<br />IF @QBFlag = 0 and @i &gt; 500<br />BEGIN<br />WAITFOR DELAY '00:05:00.'<br />set @i = 0<br />END<br /><br />PRINT 'Transaction quantity of ' + CAST(@Quantity AS VARCHAR(12)) + ' for item ID ' + @ItemID + ' for customer ID ' + @CustomerID + ' is now posted.'<br />FETCH NEXT<br />FROM curOutput<br />INTO @CustomerID, @TemplateID, @TransactionDate, @CustomerTermsID, @CustomerMsgID, @ItemID, @Quantity, @Rate, @Amount, @QBFlag ; END<br />--End subroutine for QB insert<br /><br />CLOSE curOutput<br />DEALLOCATE curOutput<br /><br />Our original code was identical to the above, except that it did not include the WAITFOR DELAY code triggered every time the FQSavetoCache flag is set to zero. The code works beautifully and has successfully created invoices in QuickBooks for hundreds of customers.<br /><br />Adding the 10-second delay when the FQSavetoCache flag was set to zero would resolve the issue, but it has not. If the 10-second delay doesn't seem to work when the flag is zero, I could set the delay to wait for a second or two after each row of data. Unfortunately, we are only at about a 97 - 98% success rate in the accuracy of the invoices being generated, and the issue seems to be the inability of QuickBooks (or the QODBC driver) to keep up with the data being fed from our SQL Server table (which we have verified is 100% accurate).A<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/Drop/step1.png" alt="http://support.flexquarters.com/esupport/newimages/Drop/step1.png" width="1580" height="731" /><br /><br /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br />OLE DB provider "MSDASQL" for linked server "qremote" returned message "[QODBC] Not supported - At least one Line record is required. Please insert Child/Detail record(s) before inserting Parent/Header record. For more details, please visit:qodbc.com/links/2953".<br />Msg 7343, Level 16, State 2, Line 74<br />The OLE DB provider "MSDASQL" for linked server "qremote" could not INSERT INTO table "[MSDASQL]".</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Do you have any suggestions? Please advise.<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> We did troubleshooting and found that SQL Server sends the Disconnect command every 5 minutes. The disconnect command is not expected from SQL Server when there is activity on the linked server. This is not a QODBC or QRemote issue.<br /><br /> <a href="http://forums.sqlteam.com/t/sql-server-linked-server-to-odbc-connection-drops-connection-every-4-5-minutes/2635" target="_blank">[forums.sqlteam.com]SQL Server Linked Server to ODBC Connection Drops connection every 4-5 minutes</a><br /><br /> <a href="https://social.technet.microsoft.com/Forums/en-US/dc7ee777-e75a-4b62-8c1e-59f2dbcea530/sql-server-linked-server-to-odbc-connection-drops-connection-every-45-minutes?forum=sqldatabaseengine" target="_blank">[social.technet.microsoft.com]SQL Server Linked Server to ODBC Connection Drops connection every 4-5 minutes</a><br /><br /> <a href="http://forums.sqlteam.com/t/is-there-a-way-to-disconnect-linked-server-connection-not-delete-and-re-add/2958" target="_blank">[forums.sqlteam.com]Is there a way to Disconnect the Linked Server connection - Not delete and re-add</a><br /><br /> <a href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0d638dec-0f13-4d42-a7fa-96c5a6b78f33/is-there-a-way-to-disconnect-linked-server-connection-not-delete-and-readd?forum=sqldatabaseengine" target="_blank">[social.technet.microsoft.com]Is there a way to Disconnect the Linked Server connection - Not delete and re-add</a><br /><br />There seems to be no option in SQL Server, which is why SQL Server is sending the Disconnect command.<br /><br />We can't use MS Access as middleware because MS Access as a middleware has the same issue.<br /><br /> </span></p>
<h4><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Workaround 1:</span></span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"> As a workaround, you can add some timing logic to the looping, like if the header insert is completed, if it is 4 minutes, it will sleep for 1 minute &amp; 10 seconds. The sleep of 1 minute &amp; 10 seconds will automatically send a disconnect command and resume after 1 minute. By doing so, you noticed no loss of invoice line. But yes, inserting time increased due to sleep.<br /><br />Please use the script below:<br /><br />SET NOCOUNT ON<br /><br />DECLARE curOutput CURSOR FOR SELECT CustomerRefListID, TemplateRefListID, TxnDate, TermsRefListID, CustomerMsgRefListID, InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, FQSavetoCache FROM dbo.QBQODBC_INVOICEPOSTINGDATA WHERE CustomerRefListID IS NOT NULL ORDER BY CustomerRefListID, FQSavetoCache DESC<br />DECLARE @CustomerID VARCHAR(100)<br />DECLARE @TemplateID VARCHAR(100)<br />DECLARE @TransactionDate DATETIME<br />DECLARE @CustomerTermsID VARCHAR(100)<br />DECLARE @CustomerMsgID VARCHAR(100)<br />DECLARE @ItemID VARCHAR(100)<br />DECLARE @Quantity DECIMAL(18,2)<br />DECLARE @Rate DECIMAL(18,2)<br />DECLARE @Amount DECIMAL(18,2)<br />DECLARE @QBFlag INT<br />DECLARE @i INT<br />DECLARE @firstTime datetime<br />DECLARE @currentTime datetime<br />SET @i = 0<br />set @firstTime=GETDATE();<br />set @currentTime=GETDATE();<br /><br />OPEN curOutput<br />FETCH NEXT<br />FROM curOutput<br />INTO @CustomerID,@TemplateID,@TransactionDate,@CustomerTermsID,@CustomerMsgID,@ItemID,@Quantity,@Rate,@Amount,@QBFlag;<br />--Subroutine for QB insert<br />WHILE @@FETCH_STATUS = 0<br /><br />BEGIN<br />INSERT INTO QRemote...INVOICELINE (CustomerRefListID, TemplateRefListID,TxnDate, TermsRefListID,CustomerMsgRefListID, InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineRate,InvoiceLineAmount, FQSaveToCache)<br />VALUES( @CustomerID, @TemplateID, @TransactionDate, @CustomerTermsID, @CustomerMsgID, @ItemID, @Quantity, @Rate, @Amount, @QBFlag )<br /><br />PRINT 'Transaction quantity of ' + CAST(@Quantity AS VARCHAR(12)) + ' for item ID ' + @ItemID + ' for customer ID ' + @CustomerID + ' is now posted.'<br />set @currentTime=GETDATE();<br /><br />IF @QBFlag = 0 and ((SELECT DATEDIFF(ss,@firstTime,@currentTime))&gt; 240) --240=4 minutes. 270=4:30minutes <br /><br />BEGIN<br />PRINT 'It is Sleep time ' + CAST(@QBFlag AS VARCHAR(12)) + ' for @firstTime : ' + CONVERT(nvarchar(90), @firstTime, 21) + ' @currentTime :' + CONVERT(nvarchar(90), @currentTime, 21) + ' ------. ' <br />WAITFOR DELAY '00:01:10.'<br />set @firstTime=GETDATE();<br />set @currentTime=GETDATE();<br />PRINT 'Wake up time ' + CAST(@QBFlag AS VARCHAR(12)) + ' for @firstTime : ' + CONVERT(nvarchar(90), @firstTime, 21) + ' @currentTime :' + CONVERT(nvarchar(90), @currentTime, 21) + ' ------. ' <br />END<br /><br />FETCH NEXT<br />FROM curOutput<br />INTO @CustomerID, @TemplateID, @TransactionDate, @CustomerTermsID, @CustomerMsgID, @ItemID, @Quantity, @Rate, @Amount, @QBFlag ;<br />END<br /><br />--End subroutine for QB insert<br />CLOSE curOutput<br />DEALLOCATE curOutput<br /></span></span></p>
<h4><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Workaround 2:</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;">You can use another workaround as follows:<br /><br />1) Insert an Invoice Line along with Invoice header fields with FQSaveToCache as 0. This will create an invoice in QuickBooks.<br /><br />2) Get the Last Insert ID of the Invoice.<br /><br />3) Using a loop for the rest of the invoice line, insert each invoice line to the existing Invoice by passing TxnID &amp; with FQSaveToCache as 0 in the insert statement. This will update the current invoice and add a new line item.<br /><br />As the above solution does not use FQSaveToCache, the SQL Server Disconnect issue will not affect it.<br /><br />Please use the script below:<br /><br />SET NOCOUNT ON<br /><br />DECLARE curOutput CURSOR FOR SELECT CustomerRefListID, TemplateRefListID, TxnDate, TermsRefListID, CustomerMsgRefListID, InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount, FQSavetoCache FROM dbo.QBQODBC_INVOICEPOSTINGDATA WHERE CustomerRefListID IS NOT NULL ORDER BY CustomerRefListID, FQSavetoCache DESC DECLARE @CustomerID VARCHAR(100)<br />DECLARE @TemplateID VARCHAR(100)<br />DECLARE @TransactionDate DATETIME<br />DECLARE @CustomerTermsID VARCHAR(100)<br />DECLARE @CustomerMsgID VARCHAR(100)<br />DECLARE @ItemID VARCHAR(100)<br />DECLARE @Quantity DECIMAL(18,2)<br />DECLARE @Rate DECIMAL(18,2)<br />DECLARE @Amount DECIMAL(18,2)<br />DECLARE @QBFlag INT<br />DECLARE @i INT<br />DECLARE @txnID VARCHAR(100)<br />SET @i = 0<br />OPEN curOutput<br />set @txnID =''<br />FETCH NEXT<br />FROM curOutput<br />INTO @CustomerID,@TemplateID,@TransactionDate,@CustomerTermsID,@CustomerMsgID,@ItemID,@Quantity,@Rate,@Amount,@QBFlag;<br />--Subroutine for QB insert<br />WHILE @@FETCH_STATUS = 0<br />BEGIN<br /><br />if @txnID =''<br />begin<br />INSERT INTO QRemote...INVOICELINE (CustomerRefListID, TemplateRefListID,TxnDate, TermsRefListID,CustomerMsgRefListID, InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineRate,InvoiceLineAmount, FQSaveToCache) VALUES( @CustomerID, @TemplateID, @TransactionDate, @CustomerTermsID, @CustomerMsgID, @ItemID, @Quantity, @Rate, @Amount, 0 )<br />--Get the Last inserted item<br /><br />Set @txnid= (select LastInsertId from openquery(QRemote,'sp_lastinsertid InvoiceLine'))<br /><br />end<br /><br />else<br /><br />begin<br />INSERT INTO QRemote...INVOICELINE (txnID, CustomerRefListID,TemplateRefListID, TxnDate,TermsRefListID, CustomerMsgRefListID,InvoiceLineItemRefListID, InvoiceLineQuantity, InvoiceLineRate,InvoiceLineAmount, FQSaveToCache)<br />VALUES( @txnID,@CustomerID, @TemplateID, @TransactionDate, @CustomerTermsID, @CustomerMsgID, @ItemID, @Quantity, @Rate, @Amount, 0 )<br />end<br /><br />if @QBFlag=0<br />begin<br />set @txnID =''<br />end<br /><br />PRINT 'Transaction quantity of ' + CAST(@Quantity AS VARCHAR(12)) + ' for item ID ' + @ItemID + ' for customer ID ' + @CustomerID + ' is now posted.' FETCH NEXT FROM curOutput INTO @CustomerID, @TemplateID, @TransactionDate, @CustomerTermsID, @CustomerMsgID, @ItemID, @Quantity, @Rate, @Amount, @QBFlag ; END<br />--End subroutine for QB insert<br /><br />CLOSE curOutput<br />DEALLOCATE curOutput<br /> </span></p>
<p>&nbsp;</p>
<div id="commentparent">
<div id="commentsformcontainer"><form action="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Comments/Submit/2418/" enctype="multipart/form-data" method="post" name="CommentsForm"></form></div>
</div>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - QODBC Connection to Talend Open Studio]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2688]]></link>
<guid isPermaLink="false"><![CDATA[b38e5ff5f816ac6e4169bce9314b2996]]></guid>
<pubDate><![CDATA[Thu, 08 Oct 2015 08:58:05 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - QODBC Connection to Talend Open Studio
Note: The JDBC-ODBC bridge driver was removed in Java 8, preventing ODBC drivers from being usable in newer versions of Java or other Java-based applications.
Refer:&nbsp;Oracle JDBC-ODBC Bridge
...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - QODBC Connection to Talend Open Studio</span></h2>
<p><span style="color: #000000; font-family: Arial,Helvetica,sans-serif;"><strong><span style="color: #ff0000;">Note</span></strong><span style="color: #ff0000;">:</span></span> <strong>The JDBC-ODBC bridge driver was removed in Java 8, preventing ODBC drivers from being usable in newer versions of Java or other Java-based applications.</strong></p>
<p>Refer:&nbsp;<a href="http://docs.oracle.com/javase/7/docs/technotes/guides/jdbc/bridge.html" target="_blank">Oracle JDBC-ODBC Bridge</a></p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How to Use QODBC with NetBeans</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> QuickBooks Enterprise comes with a tool called QODBC that enables connecting to a QuickBooks database to read and write data. I have installed it and can successfully see QuickBooks data by connecting with Excel.<br /><br />I am attempting to be able to read data in Talend Open Studio 5.4.1 by using the Generic ODBC connector. I can get a successful connection message when setting up the database connection, but retrieving the schema to see the tables shows no tables. There are no errors or any other indication - just no table listing. <br /><br /> <img src="//support.flexquarters.com/esupport/newimages/Talend/step1.png" alt="http://support.flexquarters.com/esupport/newimages/Talend/step1.png" width="785" height="503" /><br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Please query the table directly instead of loading tables. Use a tDBInput component, use a SELECT query, &amp; Click on "Guess Schema."<br /><br />For Example:<br /><br />Select * from the customer<br /><br /></span></p>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to get VBA to execute two statements at the same time]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2686]]></link>
<guid isPermaLink="false"><![CDATA[3a0844cee4fcf57de0c71e9ad3035478]]></guid>
<pubDate><![CDATA[Thu, 08 Oct 2015 08:42:23 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to get VBA to execute two statements at the same time
Problem Description:
 We use a Visual Basic app with an SQL Server database to write data to QuickBooks through QODBC. We are executing two SQL statements as described in your h...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to get VBA to execute two statements at the same time</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> We use a Visual Basic app with an SQL Server database to write data to QuickBooks through QODBC. We are executing two SQL statements as described in your help. We are getting an error saying either:<br /><br />1) The transactions are not in balance - meaning it seems that both transactions are not being executed at the same time, or<br /><br />2) If we try to combine the two text strings into one SQL server statement, that "missing semicolon at the end of SQL statement."<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You are getting a transaction not in balance error because only one statement is executed. You should execute both statements one by one.<br /><br />You cannot run both statements at the same time. You have to run them one after the other.<br /><br />Also, the connection should not be closed between the executions of two queries. If the connection is closed, then you will face the error.<br /><br />Please refer to the below-mentioned sample VBA code for executing two statements one after the other:<br /><br />Public Sub exampleInsert()<br /><br />Const adOpenStatic = 3<br /><br />Const adLockOptimistic = 3<br /><br />Dim oConnection<br /><br />Dim oRecordset<br /><br />Dim sMsg<br /><br />DoCmd.RunSQL " INSERT INTO JournalEntryCreditLine(refnumber,journalcreditlineaccountreffullname,JournalCreditLineAmount,JournalCreditLineMemo,FQSaveToCache) Values ('1234','operating1',555.00,'test memo transfer cred',1)&rdquo;<br /><br />DoCmd.RunSQL " INSERT INTO JournalEntryDebitLine(ref number,JournalDebitLineAccountReffullname, JournalDebitLineAmount, JournalDebitLineMemo, FQSaveToCache) VALUES ('1234', 'operating2',555.00, 'Test Memo transfer deb,' 0)."</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br />sMsg = sMsg &amp; "Record Added!!!"<br /><br />MsgBox sMsg<br /><br />Set oRecordset = Nothing<br /><br />Set oConnection = Nothing<br /><br />End Sub<br /><br /><br /></span></p>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How do I build a connection string with all the available QRemote parameters / Connection String with QRemote Parameters.]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2681]]></link>
<guid isPermaLink="false"><![CDATA[dcda54e29207294d8e7e1b537338b1c0]]></guid>
<pubDate><![CDATA[Tue, 08 Sep 2015 07:30:09 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[General Connection String
Instructions
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The most difficult part of using QRemote in programming is the connection string. The simplest form includes a reference to a DSN. A system DSN called "QuickBooks Data QRemote" for 32...]]></description>
<content:encoded><![CDATA[<h2><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6633cc;">General Connection String</span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The most difficult part of using QRemote in programming is the connection string. The simplest form includes a reference to a DSN. A system DSN called "QuickBooks Data QRemote" for 32-bit applications &amp; "QuickBooks Data 64-bit QRemote" for 64-bit applications is automatically created when QODBC is installed. "QuickBooks Data QRemote" will be used in all examples, but can be substituted for any different DSN name you make.<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Normally, ADO pools connections. QRemote does <span style="color: #ff0000;">not</span> support connection pooling. It is recommended to tell ADO not to do connection pooling on any QRemote connection. This is done with OLE DB Services=-2.</span></p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">Parameters available on the connection string</span></span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><!--mstheme--> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <span style="color: #0000cc;">IP Address</span> = IP address of QRemote Server. <!--mstheme--> <!--msthemelist--> <!--msthemelist--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <!--mstheme--> <span style="color: #0000cc;">Port</span> = IP address of QRemote Server. <!--mstheme--> <!--msthemelist--> <!--msthemelist--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <!--mstheme--> <span style="color: #0000cc;">EncryptionKey</span> = Encryption Key settled in QRemote Server. (If you have set the Encryption Key in QRemote Server.) By default, it is blank. <!--mstheme--> <!--msthemelist--> <!--msthemelist--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <!--mstheme--> <span style="color: #0000cc;">RemoteDSN</span> = Remote DSN which you want to use. By default, it is "QuickBooks Data." </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" />&nbsp;<span style="color: #0000cc;">OLE DB Services</span>=-2</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <strong><span style="color: #990000;">Example of a simple DSN</span></strong><br />32-bit:<br />sConnectString = "DSN=QuickBooks Data QRemote;OLE DB Services=-2;"<br /> <br />64-bit:<br />sConnectString = "DSN=QuickBooks Data 64-bit QRemote;OLE DB Services=-2;"<br /> <br /> <strong><span style="color: #990000;">Example of a DSNless connection string</span></strong><br />Without Encryption Key:<br />sConnectString = "Driver={QRemote for QuickBooks};OLE DB Services=-2;IPAddress=127.0.0.1;Port=4500;RemoteDSN=QuickBooks Data;" <br /> <br />With Encryption Key:(Replace 123456 with your Encryption Key value) <br />sConnectString = "Driver={QRemote for QuickBooks};OLE DB Services=-2;IPAddress=127.0.0.1;Port=4500;EncryptionKey=123456;RemoteDSN=QuickBooks Data;" <br /> <br /> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #820000;"><strong><span style="color: #990000;">Standard syntax</span></strong><br /> </span>"Driver={QRemote for QuickBooks};OLE DB Services=-2;IPAddress=127.0.0.1;Port=4500;"</span><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to record the issue I am facing and show/share the screen.]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2678]]></link>
<guid isPermaLink="false"><![CDATA[94aef38441efa3380a3bed3faf1f9d5d]]></guid>
<pubDate><![CDATA[Fri, 28 Aug 2015 09:19:46 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to record the issue I am facing and show/share the screen.
Problem Description:
How to record the issue I am facing and show/share the screen. 
Solutions:
 Please follow the steps below for recording the issue you are facing. 1) ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to record the issue I am facing and show/share the screen.</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">How to record the issue I am facing and show/share the screen.<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Please follow the steps below for recording the issue you are facing. <br /><br />1) Download screen recorder "TinyTake."<br /><br /> <a href="http://tinytake.com/">Click Here to Download TinyTake.</a> <br /><br />Download the software &amp; install it.<br /><br />2) Run TinyTake from the Start menu.<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/TinyTake/step1.png" alt="" /><br /><br />3) Click on Capture Video. <br /><br /> <img src="//support.flexquarters.com/esupport/newimages/TinyTake/step2.png" alt="" /><br /><br />3) Please select&nbsp;the region you want to show &amp; click on Start Recording. <br /><br /> <img src="//support.flexquarters.com/esupport/newimages/TinyTake/step3.png" alt="" /><br /><br /> <img src="//support.flexquarters.com/esupport/newimages/TinyTake/step4.png" alt="" /><br /><br />4) Click on the stop to finish recording. You can click on pause to pause recording.<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/TinyTake/step5.png" alt="" /><br /><br />4) Click on the save icon to save the video locally.&nbsp;</span>Click on Save &amp; Share to upload the video to TinyTake's video sharing service.</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <img src="//support.flexquarters.com/esupport/newimages/TinyTake/TinyTake-Save-Share.png" alt="" /><br /><br />5) Copy&nbsp;the TinyTake video link by clicking on the "Copy&nbsp;Link" button and&nbsp;share it with us in a support ticket.<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/TinyTake/TinyTake-Share-copylink.png" alt="" /><br /><br /> </span></p>
<div>&nbsp;</div>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to locate data found in QuickBooks by table and field name inside QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2676]]></link>
<guid isPermaLink="false"><![CDATA[d89a66c7c80a29b1bdbab0f2a1a94af8]]></guid>
<pubDate><![CDATA[Fri, 28 Aug 2015 08:43:47 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to locate data found in QuickBooks by table and field name inside QODBC
Problem Description:
I have a question about how to locate data found in QuickBooks by table and field name inside the QODBC system. 
Solutions:
 The fastest...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to locate data found in QuickBooks by table and field name inside QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I have a question about how to locate data found in QuickBooks by table and field name inside the QODBC system.<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> The fastest way to find data in QuickBooks via the QODBC Driver is to use the batch and sync method. Inside QuickBooks, place a unique "bait" value in the field in question, such as <strong>find me</strong>&nbsp;for text fields or 123321 for numeric fields, and save the data. Then start the QODBC Test Tool and connect to the QuickBooks company file. Refer to&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2512" target="_blank">Connecting QODBC Driver to QuickBooks for the First Time (Video)</a>, then do a global search for the "bait" value. The file and field name will be shown if the data is available via QODBC. <br /><br />Please follow the steps below to locate QuickBooks data by table and field name inside the QODBC system.<br /><br />1) Add a sample <strong>find me</strong>&nbsp;to Invoice or bill records (i.e., RefNumber).<br /><br />For Example, we are creating an Invoice with RefNumber (i.e., Invoice#) <strong>findme</strong>. <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2676/Q1.png" alt="" /><br />2) Add a sample <strong>123321</strong> in the CreditMemo rate.<br /><br />For Example, we are creating a CreditMemo with a rate of&nbsp;<strong>123321</strong>. <br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2676/Q2.png" alt="" /><br />3) Use the SP_GLOBALSEARCH command to search data from the QuickBooks company file. <strong>(Requires v16.0.0.317 or above)</strong> <br /><br />sp_globalsearch SearchValue<br /><br />For Example: <br /><br />sp_globalsearch 'find me.'<br /><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2676/Q3.png" alt="" /> <br />sp_globalsearch '123321' </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2676/Q4.png" alt="" /> <br /></span></p>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to give refund to existing CreditMemo using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2675]]></link>
<guid isPermaLink="false"><![CDATA[a8aa681aaa4588a8dbd3b42b26d59a1a]]></guid>
<pubDate><![CDATA[Fri, 28 Aug 2015 08:31:45 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to give a refund to an existing CreditMemo using QODBC
Problem Description:
How can I apply a refund check to an existing credit memo using QODBC?In QuickBooks, I can refund by opening the Create Credit Memos/Refunds dialogue box u...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to give a refund to an existing CreditMemo using QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">How can I apply a refund check to an existing credit memo using QODBC?<br /><br />In QuickBooks, I can refund by opening the Create Credit Memos/Refunds dialogue box using the QuickBooks UI and finding the credit memo for that customer. In the dialogue box icon bar, click on "Use the credit to give a refund." <br /><br /> <img src="//support.flexquarters.com/esupport/newimages/CMR/step1.png" alt="" /><br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You can use the CheckApplyCheckToTxn table and the Insert Only table to create a check to pay off a credit memo. You can give refunds to an existing credit memo by using the queries below: <br /><br />INSERT INTO CheckExpenseLine (AccountRefListID, ExpenseLineAccountRefListID, ExpenseLineAmount, ExpenseLineMemo, ExpenseLineCustomerRefListID, ExpenseLineBillableStatus, FQSaveToCache) Values ('20000-933270541', '40000-933270541',80, 'Test Memo,' '800000E2-1513333899', null,1) <br /><br /> <img src="//support.flexquarters.com/esupport/newimages/CMR/step2.png" alt="" /><br /><br />Insert into CheckApplyCheckToTxn ( AccountRefListID, PayeeEntityRefListID, TxnDate, ApplyCheckToTxnTxnID, ApplyCheckToTxnAmount) values ('20000-933270541', '800000E2-1513333899',{d'2017-12-18'},'1B3C0-1513338090',80)<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/CMR/step3.png" alt="" /><br /><br />After executing the above queries, you can see CreditMemo as Refunded in QuickBooks.<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/CMR/step5.png" alt="" /><br /><br />You can get ApplyCheckToTxnTxnID from the TxnID field of the CreditMemo table for that particular Transaction by using the below query.<br /><br />SELECT TxnID, RefNumber FROM CreditMemo where RefNumber='1268'<br /><br /> <img src="//support.flexquarters.com/esupport/newimages/CMR/step4.png" alt="" /><br /><br /> </span></p>
<div id="commentparent">
<div id="commentsformcontainer"><form action="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Comments/Submit/2418/" enctype="multipart/form-data" method="post" name="CommentsForm"></form></div>
</div>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Getting QODBC Not Supported error while Inserting Invoice]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2655]]></link>
<guid isPermaLink="false"><![CDATA[e0688d13958a19e087e123148555e4b4]]></guid>
<pubDate><![CDATA[Fri, 10 Jul 2015 08:43:42 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - Getting the QODBC Not Supported error while inserting an invoice
Problem Description:
I am trying to insert an Invoice, but I am getting the following error: [QODBC] Not supported (#10003)  I am using below SQL statements: INSERT INTO ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - Getting the QODBC Not Supported error while inserting an invoice</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I am trying to insert an Invoice, but I am getting the following error:<br /><br /> [QODBC] Not supported (#10003) <br /><br /> I am using below SQL statements:<br /><br /> INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, '', 1)<br /><br /> INSERT INTO "Invoice" ("CustomerRefListID," "ARAccountRefListID," "TxnDate," "RefNumber," "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity," "BillAddressState," "BillAddressPostalCode," "BillAddressCountry," "spending," "TermsRefListID," "DueDate," "ShipDate," "ItemSalesTaxRefListID," "Memo," "IsToBePrinted," "CustomerSalesTaxCodeRefListID") VALUES ('470001-1071525403', '40000-933270541', {d'2002-10-01'}, '1', 'Brad Lamb,' '1921 Appleseed Lane', 'Bayshore,' 'CA,' '94326', 'USA,' 0, '10000-933272658', {d'2002-10-31'}, {d'2002-10-01'}, '2E0000-933272656', 'Memo Test,' 0, '10000-999022286') <br /><br /> I am getting the following error: </span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/NotSupported/step1.png" alt="http://support.flexquarters.com/esupport/newimages/NotSupported/step1.png" width="308" height="125" /></span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <br /><br /> Please let me know what I am doing wrong.<br /><br /><br /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You need to either provide a value for SalesTaxCodeRefListID, remove it, or pass null as a value instead of an empty string from the insert statement.<br /><br /> Your insert statement should be as follows:<br /><br /> INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, null, 1)<br /><br /> INSERT INTO "Invoice" ("CustomerRefListID," "ARAccountRefListID," "TxnDate," "RefNumber," "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity," "BillAddressState," "BillAddressPostalCode," "BillAddressCountry," "IsPending," "TermsRefListID," "DueDate," "ShipDate," "ItemSalesTaxRefListID," "Memo," "IsToBePrinted," "CustomerSalesTaxCodeRefListID") VALUES ('470001-1071525403', '40000-933270541', {d'2002-10-01'}, '1', 'Brad Lamb,' '1921 Appleseed Lane', 'Bayshore,' 'CA,' '94326', 'USA,' 0, '10000-933272658', {d'2002-10-31'}, {d'2002-10-01'}, '2E0000-933272656', 'Memo Test,' 0, '10000-999022286') <br /><br /></span></p>
<table class="gstl_50 gssb_c" style="width: 206px; display: none; top: 170px; left: 257px; position: absolute;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="gssb_f">&nbsp;</td>
<td class="gssb_e" style="width: 100%;">&nbsp;</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Error while Inserting Bill]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2654]]></link>
<guid isPermaLink="false"><![CDATA[7180cffd6a8e829dacfc2a31b3f72ece]]></guid>
<pubDate><![CDATA[Fri, 10 Jul 2015 08:34:44 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - Error while Inserting Bill
Problem Description 1:
 I am following the steps below and getting the error.1. First, we inserted the records in the Bill &amp; BillExpenseLine table, and the papers got inserted successfully.2. Second, we a...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - Error while Inserting Bill</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 1:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I am following the steps below and getting the error.<br /><br />1. First, we inserted the records in the Bill &amp; BillExpenseLine table, and the papers got inserted successfully.<br /><br />2. Second, we are inserting the records in BillPaymentCheckLine, and we are getting the following error<br /><br />"Error Parsing Complete XML return string."<br /><br />INSERT INTO BillPaymentCheckLine (PayeeEntityRefListID, APAccountRefListID, BankAccountRefListID, RefNumber, IsToBePrinted, AppliedToTxnTxnID, AppliedToTxnPaymentAmount) VALUES('80000EB1-1435326666', '80000037-1409939589', '80000024-1409927427', '555555',1, '81D4-1435326671', 88.3)<br /><br />Please let me know what I am doing wrong.<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions 1:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Either remove RefNumber or IsToBePrinted from the insert statement. QuickBooks SDK will allow only one of the fields during insert/update &amp; due to this issue occurring.<br /><br />Your query should be as follows.<br /><br />INSERT INTO BillPaymentCheckLine (PayeeEntityRefListID, APAccountRefListID, BankAccountRefListID, RefNumber, AppliedToTxnTxnID, AppliedToTxnPaymentAmount) VALUES('80000EB1-1435326666', '80000037-1409939589', '80000024-1409927427', '555555', '81D4-1435326671', 88.3)</span>&nbsp;</p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 2:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I am&nbsp;trying to link BillItemLine with PurchaseOrder. I am using the below query to connect transactions &amp; I am getting an XML error.<br /><br />"Error Parsing Complete XML return string."<br /><br />INSERT INTO BillItemLine ( ItemLineLinkToTxnTxnID, ItemLineLinkToTxnTxnLineID, ItemLineQuantity ) values ('271B-1071512692', '271D-1071512692',300 )<br /><br />Please let me know what I am doing wrong.<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions 2:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">If you are trying to link transactions with Bill, you should include vendor details in your query. Please refer to the sample query &amp; test again:<br /><br />Your question should be as follows.<br /><br />INSERT INTO BillItemLine (VendorRefListID, ItemLineLinkToTxnTxnID, ItemLineLinkToTxnTxnLineID, ItemLineQuantity) VALUES ('10000-933272655', '271B-1071512692', '271D-1071512692',30)<br /></span></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Invoices using QRemote from SQL Server]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2651]]></link>
<guid isPermaLink="false"><![CDATA[148260a1ce4fe4907df4cd475c442e28]]></guid>
<pubDate><![CDATA[Fri, 05 Jun 2015 09:45:20 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Examples of Creating an Invoice using QRemote from SQL Server 
 Note: For multi-line invoices, some may find it easier to NOT include the header information with each line item, but rather to have separate smaller commands for the Invoice Lines and a fin...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Examples of Creating an Invoice using QRemote from SQL Server </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <strong>Note:</strong> For multi-line invoices, some may find it easier to NOT include the header information with each line item, but rather to have <span id="a0a24976-a8b6-48fe-ae8e-e3a5cfd67ba3" class="GINGER_SOFTWARE_mark">separate</span> smaller commands for the Invoice Lines and a final&nbsp; INSERT for the Invoice Header.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create an Invoice with 3 Lines</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Here we create an invoice with three lines by using 3 InvoiceLine INSERT commands (with the <span style="color: #ff0000;">FQSaveToCache</span> caching flag set true) followed by the Invoice table (header) insert, which is automatically designed to pull in all cached InvoiceLine records and save immediately.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO QRemote...InvoiceLine(InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate,InvoiceLineAmount,InvoiceLineSalesTaxCodeRefListID,FQSaveToCache) VALUES('240000-933272656','POWERTRAK-2000',200.00000,200.00,'20000-999022286',1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <strong>Note: </strong> QRemote is a linked server name. It would be best if you changed it to your linked server name.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Suppose you don't set up a linked server in SQL Server. Please refer to the link below for creating the linked server. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> For 32-bit SQL Server: <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2514">How to create Link Server with MS SQL 2005/2008/2012 32-bit Using QODBC/QRemote</a> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> For 64-bit SQL Server: <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2458/52/how-to-create-link-server-with-ms-sql-200520082012-64-bit-using-qodbcqremote">How to create Link Server with MS SQL 2005/2008/2012 64-bit Using QODBC/QRemote</a> </span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO QRemote...InvoiceLine(InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate,InvoiceLineAmount,InvoiceLineSalesTaxCodeRefListID,FQSaveToCache) VALUES('240000-933272656','POWERTRAK-3000',200.00000,200.00,'20000-999022286',1)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO QRemote...InvoiceLine(InvoiceLineItemRefListID,InvoiceLineDesc,InvoiceLineRate,InvoiceLineAmount,InvoiceLineSalesTaxCodeRefListID,FQSaveToCache) VALUES('240000-933272656','POWERTRAK-4000',200.00000,200.00,'20000-999022286',1)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Header Information </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO QRemote...InvoiceLine(CustomerRefListID, ARAccountRefListID, TxnDate, RefNumber, BillAddressAddr1, BillAddressAddr2, BillAddressCity, BillAddressState, BillAddressPostalCode, BillAddressCountry, IsPending, TermsRefListID, DueDate, ShipDate, ItemSalesTaxRefListID, Memo, IsToBePrinted, CustomerSalesTaxCodeRefListID) VALUES('160000-933272658', '40000-933270541', {d'2014-10-01'}, '1', 'Brad Lamb,' '1921 AppleseedLane', 'Bayshore,' 'CA,' '94326', 'USA,' 0, '20000-933272658', {d'2014-10-31'}, {d'2014-10-01'}, '2E0000-933272656', 'Memo Test,' 0,'10000-999022286')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step1.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step1.png" width="1100" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Results in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step2.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step2.png" width="1100" height="522" /></span></p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Related Data Location </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="1edee6aa-a2c4-410a-b36a-45e4f42b41c7" class="GINGER_SOFTWARE_mark">InvoiceLineItemRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="41838a42-b8a5-4d33-b403-68b058dbb742" class="GINGER_SOFTWARE_mark">InvoiceLineItemRefListID</span> is '240000-933272656' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, and FullName from QRemote...An item where FullName is like 'F%.'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step3.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step3.png" width="808" height="590" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="b24f92cb-0a84-4ca0-95ae-541bc7035faf" class="GINGER_SOFTWARE_mark">InvoiceLineSalesTaxCodeRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="18c36acb-d9fe-41b8-9173-266e437e0fc5" class="GINGER_SOFTWARE_mark">InvoiceLineSalesTaxCodeRefListID</span> is '20000-999022286' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, Name from QRemote...SalesTaxCode where Name like 'N%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step4.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step4.png" width="811" height="589" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="7c64ef3d-1f2a-4900-9bb4-29c02ac6b38a" class="GINGER_SOFTWARE_mark">CustomerRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="6f72d535-3e08-4d5d-831f-0dd516a69900" class="GINGER_SOFTWARE_mark">CustomerRefListID</span> is '160000-933272658' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, and FullName from QRemote...Customers where FullName like 'Aber%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step5.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step5.png" width="810" height="589" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="505d59a2-ea99-4682-a24c-ba3ada0ea829" class="GINGER_SOFTWARE_mark">ARAccountRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="da7e0de9-a47e-4897-b803-9ada8d40581b" class="GINGER_SOFTWARE_mark">ARAccountRefListID</span> is '40000-933270541' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, and FullName from QRemote...An account where a Name like 'Account%.'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step6.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step6.png" width="807" height="586" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="bca21bac-07bd-485e-979c-1f1c9149e9d4" class="GINGER_SOFTWARE_mark">ItemSalesTaxRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="283919b1-fdec-4bae-82f3-1af6c5a2c677" class="GINGER_SOFTWARE_mark">ItemSalesTaxRefListID</span> is '2E0000-933272656' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, Name from QRemote...ItemSalesTax where Name like 'San%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step7.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step7.png" width="806" height="587" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="9ddfca49-bb14-4946-9c5b-eceea9839390" class="GINGER_SOFTWARE_mark">CustomerSalesTaxCodeRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="abddc888-82df-49b8-a3ff-8a5d794e388e" class="GINGER_SOFTWARE_mark">CustomerSalesTaxCodeRefListID</span> is '10000-999022286' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, Name from QRemote...SalesTaxCode where Name like 'T%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLInvoice/step8.png" alt="http://support.flexquarters.com/esupport/newimages/SQLInvoice/step8.png" width="811" height="587" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of adding InvoiceLine items to an existing Invoice</span></h3>
<p>You can add lines to existing Invoices using SQL Linked Server without any issue. Please refer to the sample query for the same:</p>
<p>Insert&nbsp;into QRemote.InvoiceLine (TxnID, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount) VALUES ('1B308-1513325705', '320000-1071525597', '11440DECA', 5,5)</p>
<p><strong>OR</strong></p>
<p>Insert openquery(QRemote, 'select TxnID, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount from InvoiceLine where TxnID=''0''') values ('1B308-1513325705','320000-1071525597', '88880DECA', 5,5)</p>
<p><strong>Note</strong>: In the INSERT statement, a where should be TxnID=''0''. The TxnID=''0'' predicate is used to avoid retrieving data from the remote server, which can result in slower performance.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to get Bank Reconciliation details using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2650]]></link>
<guid isPermaLink="false"><![CDATA[d8bf84be3800d12f74d8b05e9b89836f]]></guid>
<pubDate><![CDATA[Fri, 05 Jun 2015 09:37:04 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to get Bank Reconciliation details using QODBC
Problem Description:
 How to get Bank Reconciliation details using QODBCI've not successfully identified any field/flag identifying the bank reconciliation status. Is this information ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to get Bank Reconciliation details using QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> How to get Bank Reconciliation details using QODBC<br /><br />I've not successfully identified any field/flag identifying the bank reconciliation status. Is this information available through QODBC? Or has it not been made available?<br /><br />I'm building a supplemental (to QuickBooks) bank account management/forecasting application. I want to be able to pull bank reconciliation data from QuickBooks (using QODBC) and be able to identify cleared/not cleared bank account transactions. This would be very useful for a client of mine. It's easy to remove all bank account transactions (debits and credits) from the Transaction table, which is very much like a bank statement if you order by date. But I've not been able to determine the CLEARED status of each transaction. Is there any way for me to determine this through QODBC?<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The Bank Reconciliation details are unavailable through the&nbsp;Intuit SDK, so they are unavailable through QODBC.<br /><br />QODBC is an ODBC driver for QuickBooks. It uses the QuickBooks SDK to communicate with QuickBooks, which means if Intuit doesn't expose one feature to the application in the SDK, QODBC cannot do it either. <br /><br />You can refer to the ClearedStatus table, which is used to clear checks using QODBC. <br /><br />The "ClearedStatus" table is an insert-only table. It is used for insertion purposes only.<br /><br />You can clear check using QODBC by inserting TxnId &amp; check the status in the "ClearedStatus" table. If you want to clear check using QODBC, please refer to the steps below:<br /><br />Please open the Check register in QuickBooks &amp; locate the transaction in which you want to update the check status.<br /><br />For Example, I want to update the check status of the Bill Payment:<br /><br />To locate the TxnID of the "BILLPMT" check, I ran the following:<br /><br />SELECT TxnID, AppliedToTxnSeqNo, TxnDate, PayeeEntityRefFullName, Amount FROM BillPaymentCheckLine where RefNumber='294'<br /><br /> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Bank/step1.png" alt="http://support.flexquarters.com/esupport/newimages/Bank/step1.png" width="887" height="402" /></span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /><br />Using this TxnID, I can mark the check as cleared by running the following using the INSERT only ClearedStatus table:<br /><br />INSERT INTO ClearedStatus ("TxnID," "ClearedStatus") VALUES ('39D7-1071529831', 'Cleared')<br /><br /></span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Bank/step2.png" alt="http://support.flexquarters.com/esupport/newimages/Bank/step2.png" width="887" height="400" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><br /><br />BTW: The valid values are: |Cleared|NotCleared|Pending|<br /><br />And the check is now marked as "Cleared" in QuickBooks.<br /><br /></span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Bank/step3.png" alt="http://support.flexquarters.com/esupport/newimages/Bank/step3.png" width="715" height="642" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /><br /> </span></p>
<p>&nbsp;</p>
<div id="commentparent">&nbsp;</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - QRemote Does not consider FQSaveToCache with working with OdbcCommand &amp; Parameters]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2646]]></link>
<guid isPermaLink="false"><![CDATA[f2e43fa3400d826df4195a9ac70dca62]]></guid>
<pubDate><![CDATA[Wed, 06 May 2015 06:53:35 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - QRemote does not consider FQSaveToCache when working with OdbcCommand &amp; Parameters
Problem Description:
 QRemote does not consider FQSaveToCache when working with OdbcCommand &amp; Parameters.I have an application that creates Sale...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - QRemote does not consider FQSaveToCache when working with OdbcCommand &amp; Parameters</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> QRemote does not consider FQSaveToCache when working with OdbcCommand &amp; Parameters.<br /><br />I have an application that creates Sales Orders. This is what I execute for each line item:<br /><br />Running this code against QODBC DSN works well if everything is local - using a 32-bit local DSN and QuickBooks local to the application. The Sales Order appears correct in QuickBooks.<br /><br />Taking the same code and connecting it to a 64-bit QRemote DSN connected to a 32-bit qODBC DSN on another machine (via QRemote Server) does not work.<br /><br />The basic flow is like this:<br /><br />cnQODBC = New OdbcConnection(ConfigurationManager.AppSettings.Item("QuickBooksConnectionString"))<br /><br />cnQODBC.Open()<br /><br />[Repeat for every sales order line item]<br /><br />Dim cmdQODBC As OdbcCommand = New OdbcCommand("insert into SalesOrderLine (CustomerRefListID, TxnDate, SalesOrderLineClassRefListID, TemplateRefListID, RefNumber, " &amp; "SalesOrderLineItemRefListID, SalesOrderLineDesc, SalesOrderLineQuantity, SalesOrderLineRate, SalesOrderLineAmount, " &amp; "CustomFieldSalesOrderLineOther1, FQSaveToCache) values (??, ??, ????????)", cnQODBC)<br /><br />cmdQODBC.Parameters.AddWithValue(", "strCustomerListID)<br /><br />cmdQODBC.Parameters.AddWithValue("", "{d'" &amp; dteInvoiceDate.ToString("yyyy-MM-dd") &amp; "'}")<br /><br />cmdQODBC.Parameters.AddWithValue(", "strLineClassListID)<br /><br />cmdQODBC.Parameters.AddWithValue(", "strTemplateListID)<br /><br />cmdQODBC.Parameters.AddWithValue("", intSalesOrderNumber)<br /><br />cmdQODBC.Parameters.AddWithValue("", strLineItemListID)<br /><br />cmdQODBC.Parameters.AddWithValue(", "strain description)<br /><br />cmdQODBC.Parameters.AddWithValue(", "intQuantity) <br /><br />cmdQODBC.Parameters.AddWithValue(", "dblLineRate) <br /><br />cmdQODBC.Parameters.AddWithValue(", "dblLineAmount) <br /><br />cmdQODBC.ExecuteNonQuery()<br /><br />[End repeat]<br /><br />cnQODBC.Close()<br /><br />cnQODBC = Nothing<br /><br />cmdQODBC.ExecuteNonQuery()</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Integer, double, and long datatype parameter passing in QRemote pass-through string format because of the flow QRemote Client --&gt; QRemote Server --&gt; QODBC Datatype conversion creates the problem in QODBC and C, and due to this issue occurred.<br /><br />The workaround for this problem is to pass a value in string format instead of basic format, as shown in the example below:<br /><br /> <strong> cmdQODBC.Parameters.AddWithValue("", intSalesOrderNumber.ToString()) //cmd.Parameters.AddWithValue("", "3");<br /><br />cmdQODBC.Parameters.AddWithValue("", intQuantity.ToString()) //cmd.Parameters.AddWithValue("", "44.2");<br /><br />cmdQODBC.Parameters.AddWithValue("", dblLineRate.ToString()) // cmd.Parameters.AddWithValue("", "113.4");<br /><br />cmdQODBC.Parameters.AddWithValue("", dblLineAmount.ToString()) //cmd.Parameters.AddWithValue("", "0");<br /><br /> </strong> Instead of <br /><br />cmdQODBC.Parameters.AddWithValue("", intSalesOrderNumber) //cmd.Parameters.AddWithValue("", 3);<br /><br />cmdQODBC.Parameters.AddWithValue("", intQuantity) //cmd.Parameters.AddWithValue("", 44.2);<br /><br />cmdQODBC.Parameters.AddWithValue("", dblLineRate) //cmd.Parameters.AddWithValue("", 113.4);<br /><br />cmdQODBC.Parameters.AddWithValue("", dblLineAmount) //cmd.Parameters.AddWithValue("", 0);</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Getting Multiple-step OLE DB operation generated errors in SQL Server]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2645]]></link>
<guid isPermaLink="false"><![CDATA[a7789ef88d599b8df86bbee632b2994d]]></guid>
<pubDate><![CDATA[Mon, 04 May 2015 14:05:59 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - Getting Multiple-step OLE DB operation generated errors in SQL Server
Problem Description:
 Trying to insert into SalesOrderLine and getting a 'Multiple-step' error. INSERT INTO QBREMOTE...SalesOrderLine (CustomerRefListID, TemplateRef...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - Getting Multiple-step OLE DB operation generated errors in SQL Server</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Trying to insert into SalesOrderLine and getting a 'Multiple-step' error. <br /><br />INSERT INTO QBREMOTE...SalesOrderLine (CustomerRefListID, TemplateRefListID, SalesOrderLineItemRefFullName, SalesOrderLineQuantity, SalesOrderLineRate, SalesOrderLineTaxCodeRefListID, ClassRefListID, FQSaveToCache) VALUES ('8000343B-1393961058', '80000008-1377787801 ', 'R1', 1.0000, 500.00, '80000001-1377787801 ', '80000003-1393947522', 0) <br /><br />OLE DB provider "MSDASQL" for linked server "QBREMOTE" returned the message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".<br /><br />Msg 7343, Level 16, State 2, Line 1<br /><br />The OLE DB provider "MSDASQL" for linked server "QBREMOTE" could not INSERT INTO table "[QBREMOTE]...[SalesOrderLine]". <br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You need to change the "Maximum Field Name Length" value from QODBC Setup Screen&gt;&gt; Advanced tab to resolve "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." at the time of insertion.<br /><br />Please follow the instructions below to change the "Maximum Field Name Length" value.<br /><br />Start&gt;&gt;All Programs&gt;&gt; QODBC Driver for use with QuickBooks&gt;&gt; Configure QODBC Data Source&gt;&gt;Go To "System DSN" (If you are using System DSN) or "User DSN" (If you are using User DSN) Tab &gt;&gt; select your DSN&gt;&gt; click "configure"&gt;&gt; Advanced &gt;&gt; "Maximum Field Name Length" change to 100.&nbsp;</span>&nbsp;</p>
<p align="center"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/MOLEDB/step1.png" alt="http://support.flexquarters.com/esupport/newimages/MOLEDB/step1.png" /></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Also, you can use openquery, which can insert records in the SalesOrderLine table:<br /><br />Insert openquery(QBREMOTE,' select CustomerRefListID, TemplateRefListID, SalesOrderLineItemRefFullName, SalesOrderLineQuantity, SalesOrderLineRate, SalesOrderLineTaxCodeRefListID, FQSaveToCache from SalesOrderLine where 1=0') values ('160000-933272658', '120000-1071512690', 'Wood Door: Exterior', 1.0000, 555.00, '10000-999022286', 0) <br /><br />Please refer:<br /><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2367/50/how-to-do-inserts-updates-and-deletes-using-openquery-with-linked-ms-sql-servers"> How to do INSERTs, UPDATEs, and DELETEs using OPENQUERY with Linked MS SQL Servers</a></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to use parameters in OPENQUERY]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2644]]></link>
<guid isPermaLink="false"><![CDATA[f35a2bc72dfdc2aae569a0c7370bd7f5]]></guid>
<pubDate><![CDATA[Mon, 04 May 2015 13:58:36 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
 How to use parameters in OPENQUERY 
Solutions:
 OPENQUERY does not accept variables for its arguments. You need to pass Basic Values as shown in the example below:
Select Query:
 DECLARE @TSQL varchar(8000), @ID varchar(25)
SEL...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> How to use parameters in OPENQUERY<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> OPENQUERY does not accept variables for its arguments. You need to pass Basic Values as shown in the example below:</span></p>
<h4><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Select Query:</span></h4>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong> DECLARE @TSQL varchar(8000), @ID varchar(25)</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>SELECT @ID = '19650'</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>SELECT @TSQL = 'SELECT * FROM OPENQUERY(QRemote ,''SELECT * FROM ReceivePayment WHERE ReceivePayment.RefNumber = ''''' + @ID + ''''''')'</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>EXEC (@TSQL)</strong></span></p>
<h4><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Update Query:</span></h4>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>DECLARE @TSQL varchar(8000), @ID varchar(25), @CName varchar(25)</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>SELECT @ID = '80000146-1513345553'</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>SELECT @CName = 'New Company'</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>SELECT @TSQL = 'Update OPENQUERY(QRemote ,''SELECT * FROM Customer WHERE Customer.ListID = ''''' + @ID + ''''''')' + 'SET CompanyName = ''' + @CName + ''''</strong></span></p>
<p><span style="font-family: arial, helvetica, sans-serif;"><strong>EXEC (@TSQL)</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Please refer to the link below:<br /> <a href="https://support.microsoft.com/en-us/kb/314520"> How to pass a variable to a linked server query </a> <br /><a href="http://stackoverflow.com/questions/3378496/including-parameters-in-openquery">Including parameters in OPENQUERY</a></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to select a record when the value is null]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2640]]></link>
<guid isPermaLink="false"><![CDATA[9a5748a2fbaa6564d05d7f2ae29a9355]]></guid>
<pubDate><![CDATA[Mon, 23 Mar 2015 13:43:36 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to select a record when the value is null
Problem Description:
 I am trying to run a report that returns ItemInventory where LastReceived is NULL. I have tried in vain to accomplish this. What syntax do you use to select a blank/nu...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to select a record when the value is null</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I am trying to run a report that returns ItemInventory where LastReceived is NULL. I have tried in vain to accomplish this. What syntax do you use to select a blank/null date, or is there a special function for this? </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solution:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You can select a blank/null date using "IS NULL" in your query. <br /><br />For example, the below query will return a row whose InventoryDate is blank or null:<br /><br />SELECT * FROM ItemInventory where InventoryDate IS NULL</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/ISNULL/step1.png" alt="http://support.flexquarters.com/esupport/newimages/ISNULL/step1.png" width="673" height="373" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;"><br />In the same way, you can use "IS NOT NULL" in your query. <br /><br />For example, the below query will return a row whose InventoryDate is not blank or null:<br /><br />SELECT * FROM ItemInventory where InventoryDate IS NOT NULL</span></span>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/ISNULL/step2.png" alt="http://support.flexquarters.com/esupport/newimages/ISNULL/step2.png" width="673" height="373" /><br /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - How to use Date() And DateAdd() function in QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2638]]></link>
<guid isPermaLink="false"><![CDATA[06c284d3f757b15c02f47f3ff06dc275]]></guid>
<pubDate><![CDATA[Fri, 13 Mar 2015 10:05:07 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to use Date() And DateAdd() function in QODBC
Problem Description:
 I want to write some select statements on InvoiceLine and SalesReceiptLine that return all records dated WITHIN the past 30 days relative to whatever TODAY is. I'm...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to use Date() And DateAdd() function in QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I want to write some select statements on InvoiceLine and SalesReceiptLine that return all records dated WITHIN the past 30 days relative to whatever TODAY is. I'm very familiar with Microsoft SQL syntax and would normally say... WHERE TxnDate &gt;= getdate()-30<br /><br />How can I reference "30 days ago" using the QODBC driver?<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> In QODBC, the function CURATE() &ndash; Returns the current computer system date as a date value.<br /><br />For example, for Today, April 18, 2006, when the following query:-<br /><br />SELECT {fn CURDATE()} as Today, ({fn CURDATE()}-30) as "30 Days Ago", TxnDate, RefNumber, InvoiceLineDesc FROM invoiceline WHERE TxnDate &gt;= ({fn CURDATE()}-30) is run in <strong>QODBC Test Tool. The</strong>&nbsp;results were:</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2638/Q1.png" alt="" /></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I need to select only the transactions that occurred in the last 90 days. I used the Access functions Date() and DateAdd() in the Criteria to filter for those transactions, but I am getting the error message "Invalid Procedure Call." Here are the Criteria that I am trying to use:<br /><br />Between Date() And DateAdd("dd",-91,Date())<br /><br />What am I doing wrong? Does QODBC have different functions for this?<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> To write Pass-thru queries for reading and to write QuickBooks&reg; data using QODBC and Microsoft&reg; Access, you must use the proper date format.<br /><br />You may use Date Macros, but you may also use specific from and to dates for more flexibility.<br /><br />This function formats dates with the QODBC format: {d 'YYYY-MM-DD'}. There is no need to remember the form, just the function's name: fncqbDate.<br /><br /> <br /><br /> <strong>Function:</strong> <br /><br />Function fncqbDate(myDate As Date) As String<br />myDate = Nz(myDate, Now)<br />fncqbDate = "{d '" &amp; Year(myDate) &amp; "-" &amp; Right("00" &amp; Month(myDate), 2) &amp; "-" &amp; Right("00" &amp; Day(myDate), 2) &amp; "'}"<br />End Function<br /> <br /><br /> <strong>Example:</strong> <br /><br />You might use fncqbDate to help create an SQL string with VBA from user input dates. <br /><br />mySQL = "sp_report customtxnDetail show TxnType,TxnID, RefNumber, Date, Name ,Memo , Amount,account parameters TxnFilterTypes = 'Check',SummarizeRowsBy = 'TotalOnly',dateFROM = " &amp; fncqbDate(BegDate) &amp; ", dateTO = " &amp; fncqbDate(EndDate) &amp; " where account like '%checking%'" <br /><br /> <br /><br /> <strong>Put Some Checks into a Table:</strong> <br /><br />Try this out and put some checks on a table:<br />1. Copy and paste fncqbDate (first function above) into a module.<br />2. Copy and paste fncGetChecks (function below) into a module.<br />3. If you need QuickBooks&reg; to open to using QODBC, open it and ensure you have authorized QuickBooks&reg; to communicate with QODBC. 4. Make sure the following references are checked in your Microsoft&reg; Access database:<br />Visual Basic For Applications<br />Microsoft Access 10.0 Object Library<br />Microsoft DAO 3.6 Object Library<br /> <br /><br />To use fncGetChecks, call it from a form or type fncGetChecks into the immediate window of the Visual Basic Editor. <br /><br />Change the default connection string if necessary by entering your connection string when prompted. <br /><br />The function will ask for: a name for the new query (make sure this doesn't already exist in your database)<br /><br />a beginning date<br /><br />an ending date<br /><br />Your connection string, which may or may not be the default offered<br /><br /> <br /><br />Function fncGetChecks()<br />On Error GoTo fncGetChecks_err<br />Dim q As String, Date1 As Date, Date2 As Date<br />q = InputBox("Give your temporary query a name:", "Temporary Pass-Thru Query", "")<br />Date1 = InputBox("Enter start date:", "Start Date", FormatDateTime(Now, vbShortDate))<br />Date2 = InputBox("Enter end date:", "End Date", FormatDateTime(Now, vbShortDate))<br />Dim db As DAO.Database, qd As DAO.QueryDef<br />Set db = CurrentDb<br />Set qd = db.CreateQueryDef(q)<br />qd.ReturnsRecords = True<br />qd.Connect = InputBox("Enter connection string:", "", "ODBC;DSN=QuickBooks Data;SERVER=QODBC")<br />qd.SQL = "sp_report customtxnDetail show TxnType,TxnID, RefNumber, Date, Name ,Memo , Amount,account " &amp; _<br />"parameters TxnFilterTypes = 'Check',SummarizeRowsBy = 'TotalOnly'," &amp; _<br />"dateFROM = " &amp; fncqbDate(Date1) &amp; ", dateTO = " &amp; fncqbDate(Date2) &amp; _<br />" where account like '%checking%'"<br />DoCmd.RunSQL "select * into tbl" &amp; q &amp; " from " &amp; q<br />Set qd = Nothing<br />Set db = Nothing<br />DoCmd.DeleteObject acQuery, q<br />DoCmd.OpenTable "tbl" &amp; q<br />Exit Function<br />fncGetChecks_err:<br /> <br />MsgBox Erl &amp; " " &amp; Err.Number &amp; ": " &amp; Err.Description<br />End Function <br /><br /><br />Also, refer to the following:<br /><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1225/57/how-to-use-prompted-date-ranges-in-ms-access-2007-using-vista"> How to Use Prompted Date Ranges in MS Access 2007 using Vista&nbsp;</a><br /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Invoice RefNumber FAQ]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2632]]></link>
<guid isPermaLink="false"><![CDATA[75455e062929d32a333868084286bb68]]></guid>
<pubDate><![CDATA[Mon, 02 Mar 2015 12:20:49 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - Invoice RefNumber FAQ
Problem Description:
 I have the invoice number (RefNumber) from my table outside QuickBooks. But if a QuickBooks user creates invoices directly in QuickBooks, then QuickBooks keeps new incrementing invoices autom...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - Invoice RefNumber FAQ</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I have the invoice number (RefNumber) from my table outside QuickBooks. But if a QuickBooks user creates invoices directly in QuickBooks, then QuickBooks keeps new incrementing invoices automatically, and the next invoice I create using my outside table will be incorrect.<br /><br />I need to replicate what QuickBooks does in determining the following QuickBooks invoice number. What do you recommend?<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> While inserting a new invoice from QODBC, if you do not pass RefNumber, QuickBooks will automatically manage and assign a RefNumber to the newly inserted invoice.<br /><br />If you would like to specify the RefNumber, and the RefNumber is numeric, it should be easy to sync up. Just get the max RefNumber from the Invoice table( of the current year), add 1 to it, and specify it in the insert statement.<br /> <br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> How do I auto-increment the Ref Number for the Invoice?<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> While inserting a new invoice from QODBC, if you do not pass RefNumber, QuickBooks will automatically increment and assign a RefNumber to the newly inserted invoice.<br /><br />For example, if the RefNumber of the last Invoice is 1111, then QuickBooks will automatically assign 1112 as a RefNumber for the newly created invoice.<br /> <br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> How do I get the max and insert the RefNumber for the Invoice?<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You can get the max RefNumber for Invoice by using the below query &amp; add 1 to the result, and can create a new invoice:<br /><br />SELECT Max(RefNumber) FROM InvoiceLine &nbsp;</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/InvoiceFAQ/step1.PNG" alt="http://support.flexquarters.com/esupport/newimages/InvoiceFAQ/step1.PNG" width="641" height="402" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">We got 2581 as the max RefNumber. Now we are creating the new invoice with RefNumber 2582. <br /><br />INSERT INTO InvoiceLine (CustomerRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount, InvoiceLineSalesTaxCodeRefListID, FQSaveToCache) VALUES ('620000-1071526513', '<strong>2582</strong>', '240000-933272656', 'POWER TRAK-2000', 200.00000, 200.00, '20000-999022286',0)</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> What happens if I use the same RefNumber for Invoice creation?<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> QuickBooks is allowing duplicate RefNumber. So when you use the same RefNumber for Invoice creation. QuickBooks will create an invoice with a duplicate RefNumber/<br /><br />For example, if the RefNumber of the last Invoice is 1111, then QuickBooks will automatically assign 1112 as a RefNumber for the newly created invoice.<br /><br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> How do I Auto Increment Alphanumeric RefNumber for Invoice?<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> First, create an invoice from QuickBooks UI &amp; assign the alphanumeric RefNumber "R0001T". Now create a new Invoice from QODBC &amp; do not pass RefNumber. QuickBooks will automatically increment and assign a RefNumber (i.e., "R0002T") to the newly inserted invoice.<br /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Online] Troubleshooting - How to create a blank Invoice in QuickBooks Online using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2629]]></link>
<guid isPermaLink="false"><![CDATA[8cff9bf6694dccfc3b6a613d05d51d16]]></guid>
<pubDate><![CDATA[Mon, 02 Mar 2015 12:09:53 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - How to create a blank Invoice in QuickBooks Online using QODBC
Problem Description:
 How do I create a note (or a blank line) on the invoice? If I do it the same way that I do it using QODBC for QuickBooks, I get an error :Error sendin...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - How to create a blank Invoice in QuickBooks Online using QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> How do I create a note (or a blank line) on the invoice? If I do it the same way that I do it using QODBC for QuickBooks, I get an error :<br /><br />Error sending txn to QB: 2020: QuickBooks message: Required param missing. We need to supply the required value for the API. QuickBooks message: Required parameter Line.SalesItemLineDetail is missing in the request.<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> You can create a blank invoice from QODBC Online by using below sample query:<br /><br />INSERT INTO "InvoiceLine" (CustomerRefFullName,"InvoiceLineItemRefFullName", RefNumber) VALUES ('Aadi Vanhorn','Test','Blank001' )<br /><br />You must create an item without providing a price/rate in the Item module. Then it would be best if you delivered ItemName in your query. In this example, I have created the Item "Test" &amp; use it in the question. You can use the RefNumber column to insert InvoiceNumber. If you don't want to provide InvoiceNumber, then QuickBooks Online automatically adds the Invoice number to the invoice. Please see the query below without including RefNumber: <br /><br />INSERT INTO "InvoiceLine" (CustomerRefFullName,"InvoiceLineItemRefFullName") VALUES ('Aadi Vanhorn','Test')</span></p>
<h3>&nbsp;</h3>
<p>&nbsp;</p>
<p>Tags: QuickBooks Online, QBO, Create Blank Invoice, QODBC Online</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Getting [QODBC] Not Supported error when try to modify TxnDeleted table]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2627]]></link>
<guid isPermaLink="false"><![CDATA[4de81d9105c85bca6e6e4666e6dd536a]]></guid>
<pubDate><![CDATA[Mon, 02 Mar 2015 11:59:36 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - Getting [QODBC] Not Supported error when trying to modify the TxnDeleted table
Problem Description:
I am trying to modify the TxnDeleted table from QuickBooks in QODBC, but getting the "[QODBC] Not Supported" error.&nbsp;
&nbsp;

&n...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - Getting [QODBC] Not Supported error when trying to modify the TxnDeleted table</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I am trying to modify the TxnDeleted table from QuickBooks in QODBC, but getting the "[QODBC] Not Supported" error.&nbsp;</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/TxnDeleted/step1.png" alt="http://support.flexquarters.com/esupport/newimages/TxnDeleted/step1.png" width="642" height="399" /><br /></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> The TxnDeleted table is the read-only table. You can't modify/delete its content. <br /><br />The insert/Update/delete feature in the TxnDeleted table is unavailable through the Intuit SDK, so they are unavailable through QODBC.<br /><br />QODBC is an ODBC driver for QuickBooks. It uses the QuickBooks SDK to communicate with QuickBooks, which means if Intuit doesn't expose one feature to the application in the SDK, QODBC cannot do it either. &nbsp;&nbsp;<br /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - MS Access Crashes Hard On Date Query]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2616]]></link>
<guid isPermaLink="false"><![CDATA[a3d06db1f8c85b2837b4603a51834425]]></guid>
<pubDate><![CDATA[Tue, 16 Dec 2014 10:19:08 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - MS Access Crashes Hard On Date Query
Problem Description:
I've linked all the QODBC tables into an Access 2010 DB. I have created table subset queries on the original tables and would like to do selects based on date ranges - other thi...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - MS Access Crashes Hard On Date Query</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I've linked all the QODBC tables into an Access 2010 DB. I have created table subset queries on the original tables and would like to do selects based on date ranges - other things, too, like JOINs - but I'm stuck with this problem. The minute I give Access a date constraint, like receive payment.TxnDate &gt;=#11/1/2014# as stated in your "How Dates Are Formatted.." documentation for Access Date formats, Access immediately crashes. No msgs in the brief QODBC log files about the crashes, as best I can tell:<br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Please try executing the following command using <strong>QODBC Test Tool</strong> to see if it can solve the issue: sp_optimizefullsync ALL.<br /><br />This command will bring some data to a local cache to increase query retrieval performance. I want to suggest that you please let me run the above command entirely. The above command may take some time, depending on your records in QuickBooks. It may take 2-24 hours or more, depending on the number of documents in the QuickBooks company file. Please let this command run entirely. Do not kill this command. It is not advisable to kill/close the application while building the Optimizer file. <br /><br />After successfully executing the above command, please create a new MS Access Database file &amp; link all tables &amp; execute the query again. It should work without any issues. <br /><br />Please refer to: <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2468/57/using-quickbooks-data-with-access-2010linked-tables-32-bit">How to Use QODBC with Microsoft Access 2010</a></span></p>
<div id="ginger-floatingG-container">&nbsp;</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - INTERNAL ERROR WHEN PROCESSING THE QBXML REQUEST]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2608]]></link>
<guid isPermaLink="false"><![CDATA[d756d3d2b9dac72449a6a6926534558a]]></guid>
<pubDate><![CDATA[Mon, 10 Nov 2014 14:46:12 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - INTERNAL ERROR WHEN PROCESSING THE QBXML REQUEST
Problem Description:
I have QuickBooks 2014 version &amp; I am using QODBC's latest version. I have a problem with querying the customer table using QODBC.&nbsp;QODBC driver consistently...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - INTERNAL ERROR WHEN PROCESSING THE QBXML REQUEST</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I have QuickBooks 2014 version &amp; I am using QODBC's latest version. I have a problem with querying the customer table using QODBC.&nbsp;<br /><br />QODBC driver consistently gets stuck on "Find Next Record" at record #9000. I have tried the following:&nbsp;<br /><br />- Reset the optimizer file<br /><br />- Rebuild the QuickBooks company file<br /><br />- sp_optimizefullsync Customer: this crashes QuickBooks or does not complete correctly. There are still records missing from the Customer table that appear in QuickBooks.<br /><br />- Query customer table using UNOPTIMIZED keyword. Unoptimized hangs at about record 9000 and does not return the Customer<br /><br />On QuickBooks SDK logs, I noticed the below error:<br /><br />20140923.175608 E 3888 QBSDKProcessRequest *** INTERNAL ERROR WHEN PROCESSING THE QBXML REQUEST ***.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">There might be some internal error that occurred during the processing request. To resolve this error, you need to get in touch with Intuit.<br /><br />Please restart QuickBooks &amp; try again, as you are saying that the query is stuck on #9000. There might be some issue with the company file. Please test the same on another company file or a sample company file to see if the problem is related to the company file.<br /><br />Also, try changing the Iterator value to 100 on QODBC Setup Screen--Advanced Tab.<br /><br />If you are still facing the same error, there might be an issue with your company file that would require repairing the company file &amp; you need to get in touch with Intuit.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Unable to find table QBAdvancedReportGroup.]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2604]]></link>
<guid isPermaLink="false"><![CDATA[880610aa9f9de9ea7c545169c716f477]]></guid>
<pubDate><![CDATA[Mon, 10 Nov 2014 14:27:54 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - Unable to find table QBAdvancedReportGroup.
Problem Description 1:
1. I'm attempting to utilize your ODBC driver for reporting through Excel from QuickBooks Enterprise. The tables in your report help guide aren't accessible to me and a...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Troubleshooting - Unable to find table QBAdvancedReportGroup.</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 1:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">1. I'm attempting to utilize your ODBC driver for reporting through Excel from QuickBooks Enterprise. The tables in your report help guide aren't accessible to me and appear as part of the QBAdvancedReportGroup. An example is a v_account view. I couldn't find any other place to get a list of the chart of accounts. Is it possible to obtain permission to be part of that group? I have added every privilege to the ODBC setup in the application but did not see that group as an option. <br /><br />Also, when opening <strong>QODBC Test Tool</strong>, I cannot use the sp_report procedure - I get the message "procedure: sp_report not found." Is that something related to the privileges? How can I get access to that procedure as outlined in your documentation?<br /><br /> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">2. I have a customer using QuickBooks Enterprise, and they are using the built-in ODBC in conjunction with MS Query and Excel to create a <span id="ed476e63-ca55-47d3-8ca8-7eea5013069a" class="GINGER_SOFTWARE_mark">refreshable</span> report. <br /><br />Whenever they close &amp; reopen QuickBooks, the query no longer works. This is because the DATABASE NAME in the "Connect to SQL Anywhere" screen changes each time QuickBooks is closed &amp; reopened.<br /><br /> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">3. I have set up a connection from Access to QuickBooks. However, I can only open tables in the QBReportAdminGroup, not those in the QBAdminGroup. I get the following error:<br /><br /> <span id="03c6f520-0b27-41ad-be5c-de36e6baa65b" class="GINGER_SOFTWARE_mark">ODBC--call</span> failed<br /><br />[Sybase<span id="d5e9e640-782c-4f3a-a6ba-6a4d88fefe94" class="GINGER_SOFTWARE_mark">]</span>[ODBC Driver<span id="2b0d6a88-8dbc-4dce-9752-a742b55037d9" class="GINGER_SOFTWARE_mark">]</span>[SQL Anywhere<span id="ba5dd63e-5b31-452c-981c-d22b21e9fb5a" class="GINGER_SOFTWARE_mark">]</span>Permission denied: you do not have permission to select from "v_sales_receipt_sn_list" (#-121).<br /><br />The ODBC user I created has all groups assigned to it.<br /><br />Also, I do not have permission to update the tables I do have access to, i.e., "QBReportAdminGroup_v_lst_item," view data.<br /><br />Please advise how to resolve these problems.<br /><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 2:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I am connected to QODC. When I run the QODBC Test Tool, it gives me an error [Sybase][ODBC driver]SQL Anywhere] Invalid user ID or password.<br /><br />I'm entering the QuickBooks administrator user ID and administrator password. Other users and passwords also don't work. <br /><br /><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/SQLAnywhere/step1.png" alt="" width="354" height="478" /><br /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">You're using <a title="Intuit Custom Reporting for QuickBooks Enterprise" href="http://support.quickbooks.intuit.com/support/articles/INF13355" target="_blank">Intuit Custom Reporting for QuickBooks Enterprise</a> and Not QODBC. I kindly request you remove any connection you use with Sybase SQL Anywhere and use QODBC.<br /><br />It would be best if you connected to "QuickBooks Data" DSN (from system/machine DSN), not to any file DSN ( Do not try connecting to File DSN, which is next to your company file with the name COMPANYFILENAME.dsn). Please refer to the below articles for how to use QODBC:<br /><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2512" target="_blank">Connecting QODBC Driver to QuickBooks for the First Time (Video)</a><br /><br />Please note: you need to select "QuickBooks Data" (if the application&nbsp;is 32-bit) or "QuickBooks Data-64-bit QRemote" (if the application&nbsp;is 64-bit) when you choose a data source instead of selecting another data source. <br /><br /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Tags:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">QBReportAdminGroup_v_txn_bill_line,&nbsp;</span>v_lst_time_activity,v_lst,v_cf, v_txn_sales_receipt_line.transaction_date, v_lst_item.description, v_lst_item.name, v_cf_item.name, v_cf_item.field, v_txn_sales_receipt_line.item_id, v_txn_sales_receipt_line.unit_price_amt, v_txn_sales_receipt_line.amount_amt, v_txn_sales_receipt_line.quantity_qnty, v_txn_sales_receipt_line.doc_num_h, v_txn_sales_receipt_line.customer_id, v_lst_ship_to.state, v_lst_ship_to.postal_code,QBReportAdminGroup.v_cf_item v_cf_item, QBReportAdminGroup.v_lst_item v_lst_item, QBReportAdminGroup.v_lst_ship_to v_lst_ship_to, QBReportAdminGroup.v_txn_sales_receipt_line v_txn_sales_receipt_line,&nbsp;qbreportadmingroup_v_lst_account</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting - Wrong Data in Excel from QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2603]]></link>
<guid isPermaLink="false"><![CDATA[92f54963fc39a9d87c2253186808ea61]]></guid>
<pubDate><![CDATA[Mon, 10 Nov 2014 14:25:56 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
We modified an invoice in QuickBooks and are trying to get the data out in Excel, but QODBC gives us the old data. Why?
Solutions:
QODBC failure to return full records is usually caused by corruption of the&nbsp;QODBC optimizer fil...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">We modified an invoice in QuickBooks and are trying to get the data out in Excel, but QODBC gives us the old data. <br /><br />Why?</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">QODBC failure to return full records is usually caused by corruption of the&nbsp;<span id="afc9105e-b5c9-4ca5-8a20-323839c36455" class="GINGER_SOFTWARE_mark">QODBC optimizer file</span>. I want to inform you that the Optimizer file may be corrupted if you are killing the&nbsp;<span id="33e92343-1a89-41c4-bf83-a8c75d2446fe" class="GINGER_SOFTWARE_mark">process</span> or query while the optimizer file is <span id="5139c00c-610c-4331-9241-7fddb530bdcf" class="GINGER_SOFTWARE_mark">building</span>. It is not advisable to kill a query while it is in execution. <br /><br />Please reset the optimizer to solve the problem.<br /><br />1) Close all other applications that use QODBC.<br /><br />2) Turn off the QODBC optimizer (QODBC Setup Screen-&gt;" Optimizer" tab-&gt;Uncheck "Use optimizer" option)<br /><br />3) Find the file with<span id="be43cfbb-c3a6-45ba-97d6-841c2879f68c" class="GINGER_SOFTWARE_mark">&nbsp;the .</span><span id="7ff030ad-9ec4-4999-8cc8-0c987e2deca0" class="GINGER_SOFTWARE_mark">opt</span> extension <span id="0cbc797a-f188-447a-956e-2d7a095cc5e5" class="GINGER_SOFTWARE_mark">at</span> the path you had assigned to the QODBC optimizer and delete the <span id="c6eadbb7-998f-41ca-98dc-8906c3333b94" class="GINGER_SOFTWARE_mark">optimizer</span> file.<br /><br />(The default path is %AppData%\QODBC Driver for QuickBooks\Optimizer)<br /><br />You can find the&nbsp;<span id="1a4c002c-5d3d-44bc-8f1b-530a9f347d1d" class="GINGER_SOFTWARE_mark">optimizer folder path</span> from QODBC Setup Screen-&gt;" Optimizer" tab. Please copy this path &amp; navigate to this path &amp; delete<span id="fd6757f3-f461-4b76-9c2b-eb3d49c4951d" class="GINGER_SOFTWARE_mark">&nbsp;the .</span><span id="860060a0-cca9-497e-abae-086cfd356e33" class="GINGER_SOFTWARE_mark">opt</span> file.<br /><br />Or<br /><br />You can directly delete<span id="17e5e4b0-8045-4caa-a471-f68733f0f132" class="GINGER_SOFTWARE_mark">&nbsp;the .</span><span id="450538f3-874a-4e73-abb5-562de48b84e6" class="GINGER_SOFTWARE_mark">opt</span> file from:<br /><br /> <span id="d2b3fc71-3491-45e9-aa56-f27160b648ef" class="GINGER_SOFTWARE_mark">Start&gt;&gt;All</span> Programs&gt;&gt; QODBC Driver for use with QuickBooks&gt;&gt;QODBC Setup Screen&gt;&gt;" Optimizer" tab&gt;&gt;Click "<strong>Reset Optimizer File(s)</strong>."</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/QXL-8004040a/step6.png" alt="" width="414" height="463" /><br />4) Turn on the QODBC optimizer (QODBC Setup Screen-&gt;" Optimizer" tab-&gt;Check "Use optimizer" option)<br /><br />5) After turning on the <span id="d6133c06-8de3-4f10-9e23-875e66984cee" class="GINGER_SOFTWARE_mark">optimizer</span>, please run the below command in <strong>QODBC Test Tool</strong>:<br /><br />sp_optimizefullsync All<br /><br />This command will bring some data to a local cache to increase query retrieval performance. I want to suggest you please let run the above command completely. The above command may take some time, depending on your QuickBooks records. It may take 2-24 hours or more, depending on the number of records in the QuickBooks company file. Please let this command run entirely. Do not kill this command. It is not advisable to kill/close the application while it's building the Optimizer file. <br /><br />6) Please test again to see if the problem is still there.<br /><br />7) After completing the above steps, please test data from <strong><span id="61ea53c3-2d3a-4570-bdd0-cad71769a062" class="GINGER_SOFTWARE_mark">QODBC Test Tool</span></strong>. If you can get updated data, then please refresh the Excel sheet so you can get <span id="25a4d8bf-749d-4bda-9688-0504444896ee" class="GINGER_SOFTWARE_mark">updated data</span>.<br /><br /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Using ClassRefListID when Inserting Invoice lines]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2594]]></link>
<guid isPermaLink="false"><![CDATA[ce758408f6ef98d7c7a7b786eca7b3a8]]></guid>
<pubDate><![CDATA[Tue, 05 Aug 2014 14:03:12 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
When inserting an invoice via a looping SQL procedure, I have invoice lines (InvoiceLine table) items that can potentially be assigned to varying classes. Using the ClassRefListID field, I class the lines accordingly and do not addre...]]></description>
<content:encoded><![CDATA[<h3>Problem Description:</h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">When inserting an invoice via a looping SQL procedure, I have invoice lines (InvoiceLine table) items that can potentially be assigned to varying classes. Using the ClassRefListID field, I class the lines accordingly and do not address the ClassRefListID in the main invoice (header/parent) table. When I examine the invoice in QuickBooks, it seems that ALL invoice line items have been forced to the SAME class (it looks like the class I last defined in the last child InvoiceLine item). I need to insert invoices with lines pointing to DIFFERENT courses, as I can manually do so in QuickBooks. Is this possible using QODBC????</span></p>
<h3>Solution:</h3>
<p>You are correct. When you create or add <span id="60ee7ee7-8a81-4557-a583-caf6b548232d" class="GINGER_SOFTWARE_mark"><span id="8e725fb1-3abb-44f7-a497-3cb483c14dd8" class="GINGER_SOFTWARE_mark">InvoiceLine</span></span>, QODBC will always use the last class referenced in the invoice (if applicable). For example, this three-line invoice:</p>
<p><strong>First Line </strong></p>
<p>INSERT INTO "InvoiceLine" ("CustomerRefListID," "ClassRefListID," "RefNumber," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('4C0000-1040154668', '60001-1019495266', 'QODBCClass1', '670004-1044572237', 'Building <span id="1728bf24-662d-443e-b2a0-c9c3d35b5dc3" class="GINGER_SOFTWARE_mark"><span id="3e378895-a130-4665-b361-519d5b6bcdbb" class="GINGER_SOFTWARE_mark">permit</span></span> Additional Room,' 100.00000, 100.00, '10000-1011136881', 1)</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q1.png" alt="" /></p>
<p>&nbsp;</p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><strong>Second Line </strong></p>
<p>INSERT INTO "InvoiceLine" ("CustomerRefListID," "ClassRefListID," "RefNumber," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('4C0000-1040154668', '80001-1026828072', 'QODBCClass1', '670004-1044572237', 'Bin Permit Renovations,' 200.00000, 200.00, '10000-1011136881', 1)</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q2.png" alt="" /></p>
<p><strong>Third Line </strong></p>
<p>INSERT INTO "InvoiceLine" ("CustomerRefListID," "RefNumber," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('4C0000-1040154668', 'QODBCClass1', '670004-1044572237', 'Less Council Rebate,' -50.00000, -50.00, '10000-1011136881', 0)</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q3.png" alt="" /></p>
<p>&nbsp;</p>
<p>Incorrectly appears in QuickBooks with all three invoice lines showing the <strong>"Manual Pool Systems"</strong> Class:&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q4.png" alt="" /></p>
<p>So, you will need to use Plan B:</p>
<p>To get around this, you can first create the invoice and then add invoice lines and specify the class to use or not to use, like this:</p>
<p>INSERT INTO "InvoiceLine" ("CustomerRefListID," "ClassRefListID," "RefNumber," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID," "FQSaveToCache") VALUES ('4C0000-1040154668', '60001-1019495266', 'QODBCClass2', '670004-1044572237', 'Building <span id="9d4fb465-76f4-4efb-98b1-ed69384fcca9" class="GINGER_SOFTWARE_mark"><span id="e584b019-778a-4d4a-9db6-d9c6dca0dd51" class="GINGER_SOFTWARE_mark">permit</span></span> Additional Room,' 100.00000, 100.00, '10000-1011136881', 0)</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q5.png" alt="" /></p>
<p>&nbsp;</p>
<p>Once the invoice is created, we can locate the TxnID using the QODBC stored procedure (as long as we haven't broken our QODBC connection):</p>
<p>SP_LASTINSERTID InvoiceLine</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q6.png" alt="" /></p>
<p>&nbsp;</p>
<p>The TxnID for the new invoice is 8D0E-1481798988, so we can now add additional lines to the invoice by doing the following:</p>
<p>INSERT INTO "InvoiceLine" ("TxnID," "ClassRefListID," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID") VALUES ('8D0E-1481798988', '80001-1026828072', '670004-1044572237', 'Bin Permit Renovations,' 200.00000, 200.00, '10000-1011136881')</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q7.png" alt="" /></p>
<p>&nbsp;</p>
<p>INSERT INTO "InvoiceLine" ("TxnID," "ClassRefListID," "InvoiceLineItemRefListID," "InvoiceLineDesc," "InvoiceLineRate," "InvoiceLineAmount," "InvoiceLineSalesTaxCodeRefListID") VALUES ('8D0E-1481798988', '', '670004-1044572237', 'Less Council Rebate,' -50.00000, -50.00, '10000-1011136881')</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q8.png" alt="" /></p>
<p>&nbsp;</p>
<p>The invoice now appears in QuickBooks with different Class values for each line:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2594/Q9.png" alt="" /></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] SP_REPORT ProfitAndLossBudgetPerformance is returning no rows.]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2592]]></link>
<guid isPermaLink="false"><![CDATA[18bb68e2b38e4a8ce7cf4f6b2625768c]]></guid>
<pubDate><![CDATA[Tue, 05 Aug 2014 13:45:56 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting:&nbsp;SP_REPORT ProfitAndLossBudgetPerformance is returning no rows.
Problem Description 1:
 I am running ProfitAndLossBudgetPerformance through MS Query, &amp; It is returning no rows. But using QuickBooks UI, I can get records from the...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;"><span id="6f029b59-1ce1-46b4-94a6-66ee59e9b5b9" class="GINGER_SOFTWARE_mark">Troubleshooting</span><span id="47c5069c-e391-48ff-9342-cfa987bbac2d" class="GINGER_SOFTWARE_mark">:&nbsp;</span>SP_REPORT ProfitAndLossBudgetPerformance is returning no rows.</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 1:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I am running ProfitAndLossBudgetPerformance through MS Query, &amp; It is returning no rows. But using QuickBooks UI, I can get records from the ProfitAndLossBudgetPerformance report. I am executing the following query:<br /><br />Sp_report ProfitAndLossBudgetPerformance show Amount_Title, Text, Label, Amount parameters DateFrom=<span id="e5aa05b0-48cf-43ff-833b-845edad119a0" class="GINGER_SOFTWARE_mark">{</span>d'2013-01-01'}, DateTo=<span id="55e19a4a-1455-468d-9f69-80eab0c884d2" class="GINGER_SOFTWARE_mark">{</span>d'2013-02-20'}, BudgetCriterion='AccountsAndClasses', SummarizeBudgetColumnsBy='Date', SummarizebudgetRowsBy='Class'<br /><br />There is no error pop-up occurring. From the QODBC logs, I noticed the following error:<br /><br />2014-06-18 19:39:03 QODBC Ver: 14.00.00.302 *********************************************************************************************************************<br /> <span id="fd4484ee-8037-41c9-8856-70fd04946fc3" class="GINGER_SOFTWARE_mark">IsAService</span>: False<br />SQL Statement: Sp_report ProfitAndLossBudgetPerformance show Amount_Title, Text, Label, Amount parameters DateFrom=<span id="fffe3824-20d6-40ac-896c-6b762a5d2099" class="GINGER_SOFTWARE_mark">{</span>d'2013-01-01'}, DateTo=<span id="283d5092-b3cc-4b82-bcf1-da748cff2162" class="GINGER_SOFTWARE_mark">{</span>d'2013-02-20'}, BudgetCriterion='AccountsAndClasses', SummarizeBudgetColumnsBy='Date', SummarizebudgetRowsBy='Class'<br />Error Getting XML in BuildAndLoadXMLForNextRecord<br />Input XML:<br /></span></p>
<p>&lt;<span id="efdd0460-84b3-429c-9511-1347355a77d7" class="GINGER_SOFTWARE_mark">?</span><span id="ce9a0858-1210-48f1-9cf8-fc99017a7c18" class="GINGER_SOFTWARE_mark">xml</span> version="1.0" encoding="ISO-8859-1"?&gt;</p>
<p>&lt;<span id="52ff8cbb-1bc1-42e0-be09-358ba74ecc32" class="GINGER_SOFTWARE_mark">?</span><span id="00a09ea1-72e3-4818-9773-4872344af2e2" class="GINGER_SOFTWARE_mark">qbxml</span> version="11.0"?&gt;</p>
<p>&lt;QBXML&gt;</p>
<p>&lt;<span id="53f0c823-7f4e-4fdb-a87c-14534cab3777" class="GINGER_SOFTWARE_mark">QBXMLMsgsRq</span> onError=" continue on error"&gt;</p>
<p>&lt;<span id="e6b8d2d7-5ae0-4cbb-916d-aa5335590649" class="GINGER_SOFTWARE_mark">BudgetSummaryReportQueryRq</span> requestID="1"&gt;</p>
<p>&lt;<span id="1808e436-06c7-4cc5-ae6d-92b75613d3c7" class="GINGER_SOFTWARE_mark">BudgetSummaryReportType</span>&gt;ProfitAndLossBudgetPerformance&lt;/BudgetSummaryReportType&gt;</p>
<p>&lt;<span id="da8621a4-30fb-4713-a20e-5923a30a0c3a" class="GINGER_SOFTWARE_mark">BudgetCriterion</span>&gt;AccountsAndClasses&lt;/BudgetCriterion&gt;</p>
<p>&lt;<span id="9ea4256b-7fdb-456d-a7f1-9c873f5f109c" class="GINGER_SOFTWARE_mark">ReportPeriod</span>&gt;</p>
<p>&lt;<span id="50ac138b-431b-4025-9a99-b4d678ab3ec6" class="GINGER_SOFTWARE_mark">FromReportDate</span>&gt;2013-01-01&lt;/FromReportDate&gt;</p>
<p>&lt;<span id="1ba7e912-02eb-4492-beb5-30694c8654c3" class="GINGER_SOFTWARE_mark">ToReportDate</span>&gt;2013-02-20&lt;/ToReportDate&gt;</p>
<p>&lt;/<span id="847f85be-7d1b-40ad-a5fe-b43cd7ff6438" class="GINGER_SOFTWARE_mark">ReportPeriod</span>&gt;</p>
<p>&lt;<span id="81bc61e1-30f4-4648-beac-61201ddeb408" class="GINGER_SOFTWARE_mark">SummarizeBudgetColumnsBy</span>&gt;Date&lt;/SummarizeBudgetColumnsBy&gt;</p>
<p>&lt;<span id="3fb33db8-5920-4b12-9ba1-2cbb3d32ea18" class="GINGER_SOFTWARE_mark">SummarizeBudgetRowsBy</span>&gt;Class&lt;/SummarizeBudgetRowsBy&gt;</p>
<p>&lt;/<span id="4907ef18-e2ee-41e1-84d5-405ccd7e3732" class="GINGER_SOFTWARE_mark">BudgetSummaryReportQueryRq</span>&gt;</p>
<p>&lt;/<span id="1689e5d2-00c3-46b0-8ac8-25a34ac7183e" class="GINGER_SOFTWARE_mark">QBXMLMsgsRq</span>&gt;</p>
<p>&lt;/QBXML&gt;</p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 2:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Is there any way to have a date prompt in this stored procedure instead of a fixed fiscal year? I am running the query in Excel using Microsoft Query. It appears to give me information regarding the current month (i.e., February info since this is the month of February) for the fiscal year identified in the parameters. Is there any way I can replace <span id="5a148f08-fad1-41cc-b0ce-2791d798bbda" class="GINGER_SOFTWARE_mark">FiscalYear</span> with a FromDate and ToDate <span id="53d0a21f-a0e3-4061-8c13-fc956a778367" class="GINGER_SOFTWARE_mark">parameter</span>? </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">As per QuickBooks SDK, the parameter "fiscal year" is required in the ProfitAndLossBudgetPerformance report. So, the parameter "fiscal year" is missing in the SQL statement. After including the required parameter, you can get all records from the ProfitAndLossBudgetPerformance report. Please refer to the query below:<br /><br />sp_report ProfitAndLossBudgetPerformance show Amount_Title, Text, Label, Amount parameters DateFrom=<span id="baba64c7-4ad4-455d-9676-a6d5c2b23fd8" class="GINGER_SOFTWARE_mark">{</span>d '2013-01-01'}, DateTo=<span id="932d939c-329d-4ec3-be74-ec72666ad77c" class="GINGER_SOFTWARE_mark">{</span>d '2013-02-20'}<span id="5802a3b8-ac1e-4a76-b9e8-5ba50a1bd52a" class="GINGER_SOFTWARE_mark">,</span>FiscalYear=2013, BudgetCriterion='AccountsAndClasses', SummarizeBudgetColumnsBy='Date', SummarizebudgetRowsBy='Class'<br /><br />Please refer to the article mentioned. You can get detailed information about how to execute sp_report in QODBC:<br /><br /> <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2369/0/how-to-use-the-quickbooks-reporting-engine-with-qodbc">How to use the QuickBooks Reporting Engine with QODBC</a><br /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How can I find source of SP_Report]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2588]]></link>
<guid isPermaLink="false"><![CDATA[fb89fd138b104dcf8e2077ad2a23954d]]></guid>
<pubDate><![CDATA[Tue, 05 Aug 2014 13:06:10 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How can I find a source of SP_Report
Problem Description 1:
 Is there a way to see the SQL QuickBooks uses to generate its reports? Also, which tool do they use to create reports?
Problem Description 2:
 I need to access information used in the QuickB...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How can I find a source of SP_Report</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 1:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Is there a way to see the SQL QuickBooks uses to generate its reports? <br />Also, which tool do they use to create reports?</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 2:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> I need to access information used in the QuickBooks audit trail report. Do you have the table name, the field names, and where the table is located? </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 3:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> Do we have access to see the code <span id="978e74df-8b46-45fe-b259-afeac968f308" class="GINGER_SOFTWARE_mark">in</span>&nbsp;the QODBC Stored Procedures? </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description 4:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">In the future, what reference can I use to connect the QuickBooks List and Transaction tables to the standard SQL SELECT and FROM statements? How can I know the table and field names used in the report, Trial Balance? For example, sp_report <span id="e60a3265-9a20-4891-831c-bb649edb0462" class="GINGER_SOFTWARE_mark">TrialBalance</span> show Debit_Title, Credit_Title, Label, Debit, Credit parameters DateMacro = '<span id="37d3670d-a62f-40ce-be40-ca6657267a57" class="GINGER_SOFTWARE_mark">LastMonth</span>'. I want to run my SQL in MS Access, not just sp_reports.For the future&nbsp;</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">QuickBooks SDK does provide output of the report, but does not provide information on how that data is derived or which tables are used in those reports.<br />QuickBooks SDK does not expose information regarding how the report is built, the tables used, or the logic. Thus, it is not available in QODBC.<br />QODBC requests the Report information from the QuickBooks SDK, and QuickBooks is the one processing it and sending the output. QODBC formats that output to a data table format.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-ALL] Using QuickBooks Data with VBA]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2571]]></link>
<guid isPermaLink="false"><![CDATA[283085d30e10513624c8cece7993f4de]]></guid>
<pubDate><![CDATA[Tue, 17 Jun 2014 07:37:06 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Using QuickBooks Data with VBA
For 64-bit, please refer to: How to Configure QODBC to Work With 64-bit MS Access.
Problem Description:
Everything worked perfectly with the installation and linking to MS Access 2010 and QuickBooks Pro 11. The tables I n...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">Using QuickBooks Data with VBA</span></h2>
<h5>For 64-bit, please refer to: <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2472/57/microsoft-access-2003-and-qodbc" target="_blank">How to Configure QODBC to Work With 64-bit MS Access</a>.</h5>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Everything worked perfectly with the installation and linking to MS Access 2010 and QuickBooks Pro 11. The tables I needed were related to my database in Access. However, how do I update (or can I update) QuickBooks using a form (linked to my tables downloaded to Access Form using QODBC )in MS Access?</span></p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can insert/update/delete records by accessing the local table. You need to write a VBA script to perform the SQL operation, or can execute existing queries, or can link the form to the existing table.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please refer to the steps below steps which contain a sample tutorial on how QODBC can work with VBA. The tutorial is for sample reference only. For further requirements, you need to develop a form or write scripts that will fetch data from a local access table and perform the insert operation in QuickBooks using QODBC.</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Creating a Form in Microsoft Access:</span></h3>
<p><strong>Note</strong>: Microsoft Access is a product with many uses and will allow you to use your QuickBooks Data files in the same fashion as Access databases.</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Open MS Access. You can find it via Windows Start-&gt;All Programs-&gt;Microsoft Office: </span></p>
<p>A default database file, nnamedDatabase1, appears in the box. You can edit this to a more relevant name, such as QuickBooks Link. acid. Save the file as type "Microsoft Office Access Databases."</p>
<p><a href="http://support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/VBA.accdb">Download Sample</a></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Then, click "Create" to create a blank database:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step1.png" alt="" width="827" height="472" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After&nbsp; the new database is created, create a New Form via the "Form Design" link in the Create Tab: </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step2.png" alt="" width="893" height="352" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After&nbsp; the new form is created, insert a button in the form: </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step3.png" alt="" width="933" height="436" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Rename the button as per your requirement (In this example, the button name is "Select Customer"):</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Now go to the button property window and set the property for the "On Click" event. Select "Event Procedure" from the dropdown list, then click on the&nbsp;<strong>"..."</strong> button:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step4.png" alt="" width="936" height="376" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The new window is open, which contains VBA code (In this example, it contains a code button click event):</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step5.png" alt="" width="982" height="470" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Now, insert the module in the form by right-clicking on the form:</strong> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step6.png" alt="" width="948" height="360" /></span></p>
<p>Write code in the module (In this example, I am writing code for the selection of the customer name):</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step7.png" alt="" width="967" height="489" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Link the newly created module with the button click event:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step8.png" alt="" width="968" height="381" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Now click on the "Select Customer" button, and you will get the names of all customers:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step9.png" alt="" width="992" height="447" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Repeating the above steps can add functionality to your VBA code as per your requirement. In this example, I have added functionality for Insert, Update &amp; Delete of customer records: </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">By clicking on the "Insert Customer" button, the New customer is added with the name "Testing VB":</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step10.png" alt="" width="950" height="440" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">By clicking on the "Update Customer" button, the newly added customer name is updated with the name "Updated Testing VB":</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/step11.png" alt="" width="923" height="352" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">By clicking on the "Delete Customer" button, the newly added customer is deleted:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Please refer to the code below code which is used in this example:</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Select Customer:</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Public Sub example select()<br />Const adOpenStatic = 3<br />Const adLockOptimistic = 3<br />Dim oConnection<br />Dim oRecordset<br />Dim sMsg<br />Dim sConnectString<br />Dim sSQL<br /> <br />sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"<br />sSQL = "SELECT Name FROM customer"<br />Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")<br /> oRecordset.CursorLocation = adUseClient<br />oConnection.Open sConnectString<br />oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic<br />sMsg = "**********************" &amp; Chr(100)<br />Do While (Not oRecordset.EOF)<br />sMsg = sMsg &amp; oRecordset.Fields("Name") &amp; Chr(100)<br />oRecordset.MoveNext<br />Loop<br />sMsg = sMsg &amp; "**********************"<br />MsgBox sMsg<br /> <br />oRecordset.Close<br />Set oRecordset = Nothing<br />oConnection.Close<br />Set oConnection = Nothing<br />End Sub<br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Insert Customer:</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Public Sub exampleInsert()<br />Const adOpenStatic = 3<br />Const adLockOptimistic = 3<br /> <br />Dim oConnection<br />Dim oRecordset<br />Dim sMsg<br />Dim sConnectString<br />Dim sSQL<br /> <br />sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"<br />sSQL = "Insert into customer (Name) values ('Testing VB')"<br />Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")<br />oRecordset.CursorLocation = adUseClient<br />oConnection.Open sConnectString<br />oConnection.Execute (sSQL)<br />sMsg = sMsg &amp; "Record Added!!!"<br />MsgBox sMsg<br /> <br />Set oRecordset = Nothing<br />Set oConnection = Nothing<br />End Sub<br /> <br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Update Customer:</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Public Sub exampleUpdate()<br />Const adOpenStatic = 3<br />Const adLockOptimistic = 3<br /> <br />Dim oConnection<br />Dim oRecordset<br />Dim sMsg<br />Dim sConnectString<br />Dim sSQL<br /> <br />sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"<br />sSQL = "Update customer set Name='Updated Testing VB' where name='Testing VB'"<br />Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")<br />oRecordset.CursorLocation = adUseClient<br />oConnection.Open sConnectString<br />oConnection.Execute (sSQL)<br /> <br />sMsg = sMsg &amp; "Record Updated!!!"<br />MsgBox sMsg<br /> <br />Set oRecordset = Nothing<br />oConnection.Close<br />Set oConnection = Nothing<br />End Sub<br /> <br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Delete Customer:</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Public Sub exampleDelete()<br />Const adOpenStatic = 3<br />Const adLockOptimistic = 3<br /> <br />Dim oConnection<br />Dim oRecordset<br />Dim sMsg<br />Dim sConnectString<br />Dim sSQL<br />sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"<br />sSQL = "delete from customer where name='Updated Testing VB'"<br />Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")<br />oRecordset.CursorLocation = adUseClient<br />oConnection.Open sConnectString<br />oConnection.Execute (sSQL)<br />sMsg = sMsg &amp; "Record Deleted!!!"<br />MsgBox sMsg<br /> <br />Set oRecordset = Nothing<br />oConnection.Close<br />Set oConnection = Nothing<br />End Sub<br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><a href="http://support.flexquarters.com/esupport/newimages/Using QuickBooks Data with VBA/VBA.accdb">Download Sample</a></span></p>
<p><br /><span style="font-family: Arial,Helvetica,sans-serif;">Also, Refer:</span><br /><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2448/57/how-to-use-qodbc-with-microsoft-access-2007" target="_blank">How to Use QODBC with Microsoft Access 2007</a><br /><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2469/57/using-quickbooks-data-with-access-2010-import-tables-32-bit" target="_blank">Using QuickBooks Data with Access 2010 (Import Tables) 32-bit</a><br /><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2468/57/using-quickbooks-data-with-access-2010linked-tables-32-bit" target="_blank">Using QuickBooks Data with Access 2010(Linked Tables) 32-bit</a><br /><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2435/57/how-to-configure-qodbc-to-work-with-64-bit-ms-access" target="_blank">How to Configure QODBC to Work With 64-bit MS Access</a><br /><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2472/57/microsoft-access-2003-and-qodbc" target="_blank">Microsoft Access 2003 and QODBC</a></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to use Case When statement query in QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2546]]></link>
<guid isPermaLink="false"><![CDATA[92a0e7a415d64ebafcb16a8ca817cde4]]></guid>
<pubDate><![CDATA[Mon, 14 Apr 2014 15:58:28 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
How can I use the Case When statement query in QODBC
Solution: 
You can use the Case When statement query in QODBC as follows:
The Simple CASE Statement is only used in the SELECT Statement to check whether the value is equal.
Be...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">How can I use the Case When statement query in QODBC</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Solution: </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can use the Case When statement query in QODBC as follows:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The Simple CASE Statement is only used in the SELECT Statement to check whether the value is equal.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Below is an example:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT ListID, Active = CASE IsActive WHEN 1 THEN 'Active' WHEN 0 THEN 'NotActive' ELSE 'Unknown' END FROM Vendor</span></p>
<h4><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">An example of a Case When with an IN Statement:</span></h4>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can use an IN Statement in Case When as below.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">For Example:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT ListID, Balance, CASE WHEN Balance IN (11026.45,57938.60) THEN 'HIGH' WHEN Balance IN (2770.50,7125.50) THEN 'MED' WHEN Balance IN (0.45) THEN 'LOW' ELSE '--NA--' END FROM Vendor </span></p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/CaseWhen/step1.png" alt="" width="1251" height="750" /></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Insert Multiple Records into TimeTracking Table]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2543]]></link>
<guid isPermaLink="false"><![CDATA[1b113258af3968aaf3969ca67e744ff8]]></guid>
<pubDate><![CDATA[Mon, 14 Apr 2014 15:32:36 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Instruction: 
When inserting&nbsp;multiple records into a line item table, you can use column FQSaveToCache. 
Set column FQSaveToCache to 1 in all insert queries except the last line, set to 0. But the table TimeTracking is not a line item table; there ...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Instruction: </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">When inserting&nbsp;multiple records into <span id="b7730847-2538-4ced-9f05-cf39442808fb" class="GINGER_SOFTWARE_mark">a</span> line item table, you can use column FQSaveToCache. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Set column FQSaveToCache to 1 in all insert queries except the last line, set to 0. But the table <span id="160ef0c2-787c-40c6-8ef0-8ba11d7e3d3f" class="GINGER_SOFTWARE_mark">TimeTracking</span> is not a line item table; there is no FQSaveToCache column in that table. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">So you need to use the <span id="6bf97ada-08de-4045-b21c-5c6840e9700a" class="GINGER_SOFTWARE_mark">alternate method</span>. This article will show you how to use the sp_batch command to insert multiple records into <span id="b71b086b-5ac4-4e92-860e-b01bbd8ec7c0" class="GINGER_SOFTWARE_mark">TimeTracking</span>.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">If you are unfamiliar with the sp_batch statement, please refer to <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2386/0/how-to-use-batch-statements-with-qodbc">This article</a> for more information.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span id="def8a93f-fcc6-4eaf-88b2-0b006f5b4db7" class="GINGER_SOFTWARE_mark">First, please</span> run the following:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SP_BATCHCLEAR Time tracking</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">This command will remove all cached data <span id="15445489-a360-4960-bab6-8aac38f47b50" class="GINGER_SOFTWARE_mark">from</span>&nbsp;the&nbsp;<span id="1fac4d8d-c52e-489e-a981-d0031c5660c2" class="GINGER_SOFTWARE_mark">TimeTracking</span> table. It will make sure only the queries below will be executed.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2543/Q1.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Then run this query to start the batch:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SP_BATCHSTART Time tracking</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">When this query is executed, all queries later will be stored <span id="b16f4edc-a73e-4b91-ac56-9f85f37ccd57" class="GINGER_SOFTWARE_mark">in</span> the cache instead of being sent directly to QuickBooks.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2543/Q2.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Then run your insert queries. Here we use our test company file as an example:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO <span id="e3747faa-5455-4c59-9c75-44a8daf2f9c8" class="GINGER_SOFTWARE_mark">TimeTracking</span> (EntityRefListID, DurationMinutes, TxnDate, CustomerRefFullName, ItemServiceRefFullName, PayrollItemWageRefFullName) Values ('60001-1039046236'<span id="ee6d9d60-7ea1-4e38-af87-a8500303bce0" class="GINGER_SOFTWARE_mark">,</span>540, {d'2022-01-06'},&lsquo;' Kim<span id="7e6b0e9b-9b16-4003-a045-7d816f010c1d" class="GINGER_SOFTWARE_mark">:&nbsp;</span>Garland'&rsquo;, 'Installation Labor,' 'Sick -Salary')</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2543/Q3.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO <span id="a25372a9-2793-4e88-90dd-ba7b90cb391f" class="GINGER_SOFTWARE_mark">TimeTracking</span> (EntityRefListID, DurationMinutes, TxnDate, CustomerRefFullName, ItemServiceRefFullName, PayrollItemWageRefFullName) Values ('F0002-1039046343'<span id="b61560b4-d3a4-4e27-bb65-dad625e62b42" class="GINGER_SOFTWARE_mark">,</span>600, {d'2022-01-06'}, &lsquo;'West<span id="5bd6aa25-606a-40a1-9e1d-f7fbd861564f" class="GINGER_SOFTWARE_mark">:&nbsp;</span>Test'&rsquo;, 'Installation Labor,' 'Sick -Salary')</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2543/Q4.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After all insert queries are executed, upload all cached queries to QuickBooks using this command:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SP_BATCHUPDATE Time tracking</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">This query will upload all queries in the cache to QuickBooks.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2543/Q5.png" alt="" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to insert InvoiceLine item to an existing Invoice]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2542]]></link>
<guid isPermaLink="false"><![CDATA[c3a690be93aa602ee2dc0ccab5b7b67e]]></guid>
<pubDate><![CDATA[Mon, 14 Apr 2014 15:28:35 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description:
How to insert an InvoiceLine item into an existing Invoice.
I am trying to run an INSERT statement that I have run before on version 10, but I am now getting the following error. 
SQL Statement: INSERT INTO InvoiceLine (TxnID, RefN...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Problem Description:</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">How to insert an InvoiceLine item into an existing Invoice.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I am trying to run an INSERT statement that I have run before on version 10, but I am now getting the following error. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SQL Statement: INSERT INTO InvoiceLine (TxnID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc) VALUES ('56989-1362006634', '6529', '80000271-1266353613', 'Shipped On: 28/55/2013 USPS Tracking#: LC123456789012345678US')<br />System.Data.Odbc.OdbcException: ERROR [00000] [QODBC] Error parsing complete XML return string. at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean need reader, Object[] method arguments, SQL_API odbcApiMethod) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader) at System.Data.Odbc.OdbcCommand.ExecuteNonQuery()</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Solution: </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You have added the field TxnID to the insert query. The field "TxnID" is available in the insert query only when the TxnID value points to an existing entity in QuickBooks. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">If you want to add a line item record to an existing invoice, then please remove header information fields like "RefNumber" from your query.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Header information fields (CustomerRefListID, RefNumber, ShipAddress, ClassRefListID, and so on) cannot be added to the query when you try to add a line record to an existing entity. This will cause an XML error.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Here is an example of adding one line item to an existing invoice, "18E8A-1481798951," in our test company file:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO InvoiceLine (TxnID, InvoiceLineItemRefFullname, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount) VALUES ('18E8A-1481798951', 'test item 2', '11440DECA', 0.01,0.01)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please notice that all values in the query come from our test company file. Please replace them using your value when running it on your end. And you can also add other line item columns to this query according to your request. </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-ALL] ERROR [42000] [QODBC] Expected lexical element not found: ]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2538]]></link>
<guid isPermaLink="false"><![CDATA[1bf0c59238dd24a7f09a889483a50e8f]]></guid>
<pubDate><![CDATA[Mon, 14 Apr 2014 13:54:22 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Problem Description 1: 
 I'm working in PHP and using the QODBC Test Tool. I am trying to insert a value into the Customer table. 
 But I am getting the following error:  
 Expected lexical element not found:  
 My insert statement is: 
 Insert into ...]]></description>
<content:encoded><![CDATA[<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Problem Description 1: </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> I'm working in PHP and using the QODBC Test Tool. I am trying to insert a value into the Customer table.<br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"> But I am getting the following error: <br /> </span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"> <strong>Expected lexical element not found: </strong><br /> </span></span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"> My insert statement is:<br /> </span></span></span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"> Insert into Customer ('CompanyName,' 'Phone,' 'Email') values('adsf,' '235632', 'afdsf');<br /> </span></span></span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"> Won't work for me. Any suggestions as to why? <br /> </span></span></span></span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Solution 1: </span></span></span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> QODBC will issue this error when there is a syntax error in your SQL statements. <br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"> Your insert statement should be like this: <br /> </span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"> Insert into Customer ("CompanyName," "Phone," "Email") values('Test,' '235632', 'abc@def.com'); <br /> </span></span></span></p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Problem Description 2: </span></span></span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> I have constructed an insert statement that is getting this error. To narrow it down, I modified the values portion of my query to be a select, inserted, and tested the different data types I was trying to select. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> After doing so, I was able to determine that the problem is with both the ts and d functions that we have here, and I had to assume that it was the input's fault and not yours, since the process is referenced everywhere. I seemed to remember reading somewhere that you guys use the computer's regional time settings to figure out how to parse out times, but after my test, I found this not to be the case. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> For example <br />select {ts'8/20/2006 9:26:15 AM'} from customer<br />and<br />select {d'9/15/2006'} from customer<br />both give the lexical element error.<br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> My "Regional and Language settings" in "Control Panel" say my date-time format looks like so: </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Time: 10:04:29 AM<br />Short Date: 8/10/2006<br />Long Date: Thursday, August 10, 2006<br /> </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">I was hoping that you guys were paying attention to it. After all, that's what .NET does, and it seems to work great. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> select {d'2006-06-26'} from customer</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> This results in "6/26/2006 12:00:00 AM," which is expected, but having to format the time for the select/insert/update/delete statement so that it can be formatted back seems like a lot of overhead... </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> For those of us using .NET (or any language that supports date/time formatting via a format string), you should be able to use the following: </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> String date= System.DateTime.Now.ToString("yyyy-MM-dd");<br />string datetime= System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss tt");</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Which will give you the following:<br />2006-08-10<br />and<br />2006-08-10 10:10:39 AM<br /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Respectively, which can be used in your SQL Statement afterward.</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Solutions 2:</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> QODBC will issue this error when there is a syntax error in your SQL statements.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> So please check your statements &amp; try again.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> QODBC uses the standard SQL Date {d'YYYY-MM-DD'} and Timestamp {ts 'YYYY-MM-DD HH:mm: SS.zzz'} formats and is the same worldwide regardless of the region: See also: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2203/0/how-are-dates-formatted-in-sql-queries-when-using-the-quickbooks-generated-time-stamps">How are dates formatted in SQL queries when using the QuickBooks-generated time stamps </a></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Insert Opening Balance in Customer Table using QODBC ]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2522]]></link>
<guid isPermaLink="false"><![CDATA[0d7363894acdee742caf7fe4e97c4d49]]></guid>
<pubDate><![CDATA[Mon, 25 Nov 2013 10:38:06 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How to Insert Opening Balance in Customer Table using QODBC 
Problem Description 
 Initially, I received the error "[QODBC] Field not allowed in insert" when I tried to insert data into the Customer table through QODBC. I was trying to insert customer d...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">How to Insert Opening Balance in Customer Table using QODBC </span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Problem Description </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Initially, I received the error "[QODBC] Field not allowed in insert" when I tried to insert data into the Customer table through QODBC. I was trying to insert customer data (Name, AccountNumber, Balance, credit limit). But QODBC does not allow me to insert data. When I attempted to insert received the following error:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/fieldnotallowedininsert.png" alt="" width="300" height="167" /></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Solutions </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Use the&nbsp;<strong>"OpenBalance"</strong> field instead of the&nbsp;<strong>"Balance"</strong> field, as QuickBooks SDK does not allow inserting a value in the "Balance" field but uses "OpenBalance." After inserting the value in the "OpenBalance" field, the value is moved to the "Balance" field. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; <strong>Sample Query:</strong><br /></span></p>
<pre><span style="font-family: Arial,Helvetica,sans-serif;">Insert into Customer
(AccountNumber,Name,BillAddressAddr1,BillAddressAddr2,BillAddressCity,BillAddressState,BillAddressPostalCode,BillAddressCountry,Phone,Fax,Email,Contact,Notes,SalesRepRefFullName,CustomerTypeRefFullName,TermsRefFullName,CreditLimit,OpenBalance,IsActive)
Values ('ABC-111', 'XYZ', 'DEF St. ', '', 'Minneapolis', 'MN', '55401', '', '999 999-9999', '', 'temp@xyz.com', 'XYZ', 'great guy', 'XYZ', '', 'COD', 0, 0, 1) </span></pre>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; <strong>Note</strong>: Sample query contains dummy data. You can add/remove fields from the question as per your requirements. Ref fields are subject to change as per your company file.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Update Invoice Due date by 30 days for a Customer]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2475]]></link>
<guid isPermaLink="false"><![CDATA[fec87a37cdeec1c6ecf8181c0aa2d3bf]]></guid>
<pubDate><![CDATA[Fri, 16 Nov 2012 08:03:24 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ProblemI need to update the old terms of a customer in QuickBooks. They used to be due upon receipt, and we need to move them to net 30. I need to go back and change all the old due dates to reflect the new terms. How can I update the DueDate to remember ...]]></description>
<content:encoded><![CDATA[<p><strong>Problem</strong><br /><br />I need to update the old terms of a customer in QuickBooks. They used to be due upon receipt, and we need to move them to net 30. I need to go back and change all the old due dates to reflect the new terms. How can I update the DueDate to remember what I tried to do? I have tried the following:<br /> <br /> UPDATE Invoice SET DueDate = DateAdd("d", 30, TxnDate) WHERE CustomerRefListID = '80000005-XXXXXXXXX'<br /><br /> UPDATE Invoice SET DueDate = {fn TIMESTAMPADD(SQL_TSI_DAY, 30, DueDate)} WHERE CustomerRefListID = '80000005-XXXXXXXXX'</p>
<p>I found this, but I am still getting an error "Invalid operand for operator &lt;assignment&gt;</p>
<p><br /><br /><strong>Solution</strong>&nbsp;</p>
<p>Please try this query in the&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> to see if it can get your jobs done:<br /> <br /> UPDATE Invoice SET DueDate = {fn CONVERT( {fn TIMESTAMPADD(SQL_TSI_DAY,30, DueDate )}, SQL_DATE)} WHERE CustomerRefListID = '80000005-XXXXXXXXX'<br /> <br /> And if you are going to do this in an MS Access linked table, please create a query and use a SQL Statement like this:<br /> <br /> UPDATE Invoice SET DueDate = DateAdd("d", 30, TxnDate) WHERE CustomerRefListID = '80000005-XXXXXXXXX'<br /> <br /><br /></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Troubleshooting: Expected lexical element not found]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2465]]></link>
<guid isPermaLink="false"><![CDATA[1e0a84051e6a4a7381473328f43c4884]]></guid>
<pubDate><![CDATA[Wed, 31 Oct 2012 11:51:19 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting: Expected lexical element not found
Problem Description&nbsp;
When trying to execute a query statement, I get the error message " Expected lexical element not found."
Solutions
It seems to be the issue in the SQL Statement. Please chec...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">Troubleshooting: Expected lexical element not found</span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Problem Description&nbsp;</span></h3>
<p><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;"><span style="color: #000000;">When trying to execute a query statement, I get the error message</span> " <strong>Expected lexical element not found</strong>."</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Solutions</span></h3>
<p><span style="color: #000000; font-family: Arial,Helvetica,sans-serif;">It seems to be the issue in the SQL Statement. Please check all the field names and table names. Usually,&nbsp;this could be a typo error in the field name in your SQL Statement. To know more about the fields and data layout, please <a href="http://qodbc.com/schema.htm" target="_blank">Click Here</a></span>&nbsp;</p>
<h3><span style="font-family: arial, helvetica, sans-serif; color: #3366ff;">Another Possible Problem &amp; Solution:</span></h3>
<h4><span style="color: #3366ff;">Problem Description:</span></h4>
<p id="yui_3_15_0_1_1409729252221_899"><span id="yui_3_15_0_1_1409729252221_910" style="font-family: arial, helvetica, sans-serif;">When I issue a SQL statement:</span></p>
<p id="yui_3_15_0_1_1409729252221_877"><span style="font-family: arial, helvetica, sans-serif;">SELECT Desc FROM Charge&nbsp;</span></p>
<p><span style="font-family: arial, helvetica, sans-serif;">I get "Expected lexical element not found: = &lt;identifier&gt;."</span></p>
<p id="yui_3_15_0_1_1409729252221_906"><span style="font-family: arial, helvetica, sans-serif;">However, if I issue</span></p>
<p><span style="font-family: arial, helvetica, sans-serif;">Select * from Charge</span></p>
<p id="yui_3_15_0_1_1409729252221_856"><span style="font-family: arial, helvetica, sans-serif;">Then, I get a full output with one of the columns named "Desc."</span></p>
<p id="yui_3_15_0_1_1409729252221_860"><span style="font-family: arial, helvetica, sans-serif;">Why can't I query for the column by name?</span></p>
<p id="yui_3_15_0_1_1409729252221_862"><span style="font-family: arial, helvetica, sans-serif;">I have tried this through the <a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> and a C# program.</span>&nbsp;</p>
<div>
<h4><span style="color: #3366ff;">Solution:</span>&nbsp;</h4>
</div>
<div><span style="font-family: arial, helvetica, sans-serif;">I want to inform you that&nbsp;Desc may be a reserved word in SQL; you are getting this error. I kindly request you to please put quotes around <strong>"Desc."</strong>&nbsp;Please use the query below, which does not issue an error:</span></div>
<div><span style="font-family: arial, helvetica, sans-serif;">&nbsp;</span></div>
<div><span style="font-family: arial, helvetica, sans-serif;">SELECT <strong>"Desc"</strong> FROM Charge&nbsp;</span></div>
<p><span style="color: #000000; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p>
<h4><span style="color: #3366ff;">Problem Description:</span></h4>
<p id="yui_3_15_0_1_1409729252221_899"><span id="yui_3_15_0_1_1409729252221_910" style="font-family: arial, helvetica, sans-serif;">I am trying to clear a date column for the JobStartDate, and I am getting an error. Any help would be great., I could not find a help article on this.<br /><br />I am using .NET if that matters.<br /><br /><br />Dim jobStartDate As Date? = Nothing<br /><br />Dim cmd As New OdbcCommand($"<br />UPDATE customer<br />SET jobStartDate = {jobStartDate}<br />WHERE ListID = '{listID}' ",<br />con)<br /><br />cmd.ExecuteNonQuery()<br /><br /><br />ERROR [42000] [QODBC] [sql syntax error] Expected lexical element not found: = CASE<br /><br /><br />Dim jobStartDate As Date = Nothing<br /><br />Dim cmd As New OdbcCommand($"<br />UPDATE customer<br />SET jobStartDate = {jobStartDate}<br />WHERE ListID = '{listID}' ",<br />con)<br /><br />cmd.ExecuteNonQuery()<br /><br />Message = "ERROR [42000] [QODBC] Unexpected extra token: :00:00"</span></p>
<p id="yui_3_15_0_1_1409729252221_877"><span style="font-family: arial, helvetica, sans-serif;">SELECT Desc FROM Charge&nbsp;</span></p>
<p><span style="font-family: arial, helvetica, sans-serif;">I get "Expected lexical element not found: = &lt;identifier&gt;."</span></p>
<p id="yui_3_15_0_1_1409729252221_906"><span style="font-family: arial, helvetica, sans-serif;">However, if I issue</span></p>
<p><span style="font-family: arial, helvetica, sans-serif;">Select * from Charge</span></p>
<p id="yui_3_15_0_1_1409729252221_856"><span style="font-family: arial, helvetica, sans-serif;">Then, I get a full output with one of the columns named "Desc."</span></p>
<p id="yui_3_15_0_1_1409729252221_860"><span style="font-family: arial, helvetica, sans-serif;">Why can't I query for the column by name?</span></p>
<p id="yui_3_15_0_1_1409729252221_862"><span style="font-family: arial, helvetica, sans-serif;">I have tried this through the <a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> and a C# program.</span>&nbsp;</p>
<div>
<h4><span style="color: #3366ff;">Solution:</span>&nbsp;</h4>
</div>
<div>Please ensure the SQL statement generated by your application is as per the following example. Please ensure the date format is correct.</div>
<div>&nbsp;</div>
<div>UPDATE customer<br />SET jobStartDate = {d'2022-11-18'}<br />WHERE ListID = 'YourListIDValue'&nbsp;</div>
<p><span style="color: #3366ff; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p>
<p><span style="color: #000000; font-family: arial, helvetica, sans-serif;">&nbsp;</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-ALL] How to execute SP_OPTIMIZEUPDATESYNC or SP_OPTIMIZEFULLSYNC for Selected Tables]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2459]]></link>
<guid isPermaLink="false"><![CDATA[8bdb5058376143fa358981954e7626b8]]></guid>
<pubDate><![CDATA[Fri, 05 Oct 2012 15:20:02 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[There are multiple ways to execute SP_OPTIMIZEUPDATESYNC or SP_OPTIMIZEFULLSYNC for selected/multiple tables.
For a Single Execution, follow the steps below.
 Click on "Start" and "Programs" and locate QODBC Driver for the QuickBooks program group. Clic...]]></description>
<content:encoded><![CDATA[<p>There are multiple ways to execute SP_OPTIMIZEUPDATESYNC or SP_OPTIMIZEFULLSYNC for selected/multiple tables.</p>
<p>For a Single Execution, follow the steps below.</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Click on <strong>"Start"</strong> and <strong>"Programs"</strong> and locate <strong>QODBC Driver for the QuickBooks</strong> program group. Click on the <strong>QODBC Test Tool</strong> icon to launch the program supplied with QODBC. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2459/Q1.png" alt="" /></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">To establish a connection, select&nbsp;<strong>"QuickBooks Data"</strong> -&gt; DSN from the dropdown list and click on <strong>"Connect."</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2459/Q2.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">This will connect you to the current company file opened by QuickBooks. After you click <strong>Connect,&nbsp;</strong>if this is the first time QODBC has used this company file, you will receive a pop-up from QuickBooks asking you to allow QODBC to run. Choose the <strong>Yes, Always</strong> option, and check the Sensitive data option.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Once you are connected, type SP_OPTIMIZEUPDATESYNC or SP_OPTIMIZEFULLSYNC and click on <strong>"Run."</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2459/Q3.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After execution, the&nbsp;following message will appear: "Total Number of Records 0."</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2459/Q4.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><strong>For Recurring / Scheduled Execution, follow the steps below.</strong></p>
<p>( ONLY IF YOU WOULD LIKE TO SCHEDULE OR CREATE A BAT TO RUN OPTIMIZER FOR SELECTED/MULTIPLE TABLES QUICKLY)</p>
<p>In the example below, we are achieving it by creating a VBScript.</p>
<p>You can create a script/exe/VBA code and execute SP_OPTIMIZEUPDATESYNC or SP_OPTIMIZEFULLSYNC for a select table.</p>
<p>In this example, we are creating a VBScript, saving it to e:\, and naming it OptimizeSelected.VBS</p>
<p>(You may change the name and drive location of your choice. Please apply the same modification to the execution statement)</p>
<p>&nbsp;</p>
<p><strong>Below is the source of the OptimizeSelected.VBS</strong></p>
<p><br />'*****************************************<br />Const adopt static = 3<br />Const adLockOptimistic = 3<br /><br />Dim oConnection<br />Dim oRecordset<br />Dim sMsg<br />Dim sConnectString<br />Dim sSQL<br /><br />sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"<br />Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")<br /><br />oConnection.Open sConnectString<br />sSQL = "SP_OPTIMIZEUPDATESYNC Invoice"<br />oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic<br /><br />sSQL = "SP_OPTIMIZEUPDATESYNC Customer"<br />oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic<br /><br />sSQL = "SP_OPTIMIZEUPDATESYNC Bill"<br />oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic<br /><br />Set oRecordset = Nothing<br />oConnection.Close<br />Set oConnection = Nothing</p>
<p>'*****************************************</p>
<p>&nbsp;</p>
<p><strong>How to execute</strong></p>
<p>&nbsp;</p>
<p>For a 64-bit machine, you can execute this using the command below</p>
<p>C:\Windows\SysWOW64\cmd.exe /c cscript e:\OptimizeSelected.vbs</p>
<p>&nbsp;</p>
<p>For a 32-bit machine, you can execute this using the command below</p>
<p>C:\Windows\System32\cmd.exe /c cscript e:\OptimizeSelected.vbs</p>
<p>&nbsp;</p>
<p>Also, Refer</p>
<p><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2416/0/troubleshooting-vb-demo-is-missing">VB Demo Missing</a></p>
<p><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2461">TroubleShooting: Cannot Get Full Records From QuickBooks</a></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> <a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2357/48/how-to-switch-off-or-reset-the-qodbc-optimizer">How to switch OFF or RESET the QODBC Optimizer </a></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Add a New Line Item to an Existing Purchase Order]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2454]]></link>
<guid isPermaLink="false"><![CDATA[03e7ef47cee6fa4ae7567394b99912b7]]></guid>
<pubDate><![CDATA[Tue, 25 Sep 2012 09:39:43 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How to Add a New Line Item to an Existing Purchase Order
DESCRIPTION: We know how to create a new PurchaseOderLine; refer to&nbsp;How to create a Purchase Order using QODBC  for more details. After creating a new line item, we found that the system autom...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">How to Add a New Line Item to an Existing Purchase Order</span></h2>
<p><span style="font-family: Arial,Helvetica,sans-serif;">DESCRIPTION<span id="2bfd8de9-9178-466d-897a-e6ab29ee464c" class="GINGER_SOFTWARE_mark">:</span> We know how to create a new PurchaseOderLine; refer to&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/1138/50/how-to-create-a-purchase-order-using-qodbc">How to create a Purchase Order using QODBC </a> for more details. After creating a new line item, we found that the system automatically <span id="62728668-6a12-4452-af5d-5b8ed3e6e9f0" class="GINGER_SOFTWARE_mark">created</span> a Purchase Order to contain the new line item. But what should be done if we want to insert a new line item into an existing Purchase Order/Invoice? Here, I will use an example to show how to add a line item to an existing Purchase Order.</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Locate and Note Down the Purchase Order TxnID</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">QuickBooks generates a unique TxnID for each transaction that is added to QuickBooks. A TxnID can be used to refer to the transaction in our following requests.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Here we note this TxnID down<span id="80a3bb3f-ff75-4694-a219-fd8b9758df48" class="GINGER_SOFTWARE_mark">&nbsp;660C-1049227173</span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2454/Q02.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">And this is the Purchase Order in QuickBooks:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2454/Q2.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Insert Line Item with the TxnID of Existing Purchase Order<br /></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Here is the query I use to insert a line item:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "PurchaseOrderLine"("<span class="style5">TxnID</span>", <br />"<span id="2e2d1f62-7b45-4e53-a125-bc5785afcf45" class="GINGER_SOFTWARE_mark">PurchaseOrderLineItemRefListID</span>", <br />"<span id="e1138969-da54-44af-8647-dde73ad1eeb0" class="GINGER_SOFTWARE_mark">PurchaseOrderLineDesc</span>," <br />"<span id="19c81883-6660-4780-85bd-f2d21ffb1244" class="GINGER_SOFTWARE_mark">PurchaseOrderLineQuantity</span>," <br />"<span id="98cf1db5-371b-4825-8b9b-9b3761596318" class="GINGER_SOFTWARE_mark">PurchaseOrderLineRate</span>," <br />"<span id="cd823590-71ff-4280-a815-47b35797e11d" class="GINGER_SOFTWARE_mark">PurchaseOrderLineAmount</span>," <br />"<span id="ba88c856-9988-4084-b536-9de0f5e23535" class="GINGER_SOFTWARE_mark">FQSaveToCache</span>") <br />VALUES ('660C-1049227173', '80000092-1481798847', <br />'Pen9', 1.0, 1.0, 1.11, 0)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2454/Q3.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please note that the TxnID is the value we noted down in our 1st step.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">And this is the result in QuickBooks:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://support.flexquarters.com/esupport/newimages/2454/Q4.png" alt="" /></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Keywords:&nbsp;adding a line on existing PO, adding a line to existing PO</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to link Class information from Transaction and Bill]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2429]]></link>
<guid isPermaLink="false"><![CDATA[a9365bd906e11324065c35be476beb0c]]></guid>
<pubDate><![CDATA[Tue, 14 Feb 2012 06:30:28 +0000]]></pubDate>
<dc:creator><![CDATA[Wilson (QODBC Support)]]></dc:creator>
<description><![CDATA[Find the transaction-related Class information
How to link Class information from Transactions and Bill
Instructions
Table Transaction in QODBC shows summary information of all transactions. But it doesn't contain Class information. You could use the T...]]></description>
<content:encoded><![CDATA[<p>Find the transaction-related Class information</p>
<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">How to link Class information from Transactions and Bill</span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Table Transaction in QODBC shows summary information of all transactions. But it doesn't contain Class information. You could use the TxnID field in the Transaction table to link to the respective table, like Invoice, InvoiceLine, or Check or Bill&nbsp;or BillItemLine, to get full information.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">In this example, we will be using the Transaction and BillItemLine table.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You will have to change the table and field names if you want to link it to BillExpenseLine (or any other).</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Use Transaction.TxnID to link to Bill and BillItemLine Tables.</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Fields TxnID and TxnLineID in table Transaction refer to Bill header record and Bill line item record:</span></p>
<p align="center"><span style="font-family: Arial,Helvetica,sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/transaction Bill -Transaction-table.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">With the value of TxnID and TxnLineID, we could find the Bill header and line item record. </span></p>
<p align="center"><span style="font-family: Arial,Helvetica,sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/transaction Bill -Transaction-Bill table link.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Get Class Information from BillItemLine</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">We can find the related Class information via the field ItemLineClassRefListID. This field directly links to the record in Class Table. Please note down the List ID in the field ItemLineClassRefListID. </span></p>
<p align="center"><span style="font-family: Arial,Helvetica,sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/transaction Bill -class.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Here is the related class information in the Class table with the same List ID: </span></p>
<p align="center"><span style="font-family: Arial,Helvetica,sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/transaction Bill -class Link.png" alt="" /></span></p>
<p align="center">&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Create an Inventory Adjustment using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2424]]></link>
<guid isPermaLink="false"><![CDATA[4a06d868d044c50af0cf9bc82d2fc19f]]></guid>
<pubDate><![CDATA[Tue, 07 Feb 2012 05:58:45 +0000]]></pubDate>
<dc:creator><![CDATA[Wilson (QODBC Support)]]></dc:creator>
<description><![CDATA[Manually modify your Item Inventory quantity
How to Create an Inventory Adjustment using QODBC 
Instructions
Although QuickBooks automatically adjusts your inventory quantities after every purchase and sale, sometimes you still need to adjust them your...]]></description>
<content:encoded><![CDATA[<p>Manually modify your Item Inventory quantity</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How to Create an Inventory Adjustment using QODBC </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Although QuickBooks automatically adjusts your inventory quantities after every purchase and sale, sometimes you still need to adjust them yourself from time to time. QuickBooks allows QODBC to access item inventory adjustment records by modifying the table InventoryAdjustmentLine. This article will show you how to create an Inventory Adjustment record using QODBC. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">There are two fields, InventoryAdjustmentLineQuantityAdjustmentQuantityDifference and InventoryAdjustmentLineQuantityAdjustmentNewQuantity in the table "InventoryAdjustmentLine." Both of them can be used to insert records. </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Use Field InventoryAdjustmentLineQuantityAdjustmentQuantityDifference </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Here is the sample statement:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO InventoryAdjustmentLine (AccountRefListID, InventorySiteRefListID<span id="0fc3cc9c-6b13-4dbb-bd55-6c1e1f85cc1f" class="GINGER_SOFTWARE_mark">,&nbsp;</span>InventoryAdjustmentLineItemRefListID<span id="5b21ac39-4a4d-49ed-880d-3a7d56b092bd" class="GINGER_SOFTWARE_mark">,&nbsp;</span><span style="color: #ff0000;">InventoryAdjustmentLineQuantityAdjustmentQuantityDifference</span>) <br />VALUES ('1D0001-896819777', '80000001-1481799256','850003-1044569333'<span id="92a70892-7ce1-4e62-949d-187dbc60330d" class="GINGER_SOFTWARE_mark">,-</span>100) </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The value in this field stands for the adjusted quantity. For example, if you need to reduce 100 units of this inventory, value this field to -100.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Here is the result in QODBC Test Tool.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2424/Q1.png" alt="" /></span></p>
<p>&nbsp;<strong><strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">And this is the result in QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2424/Q2.png" alt="" /></span></p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;"><strong>Use Field InventoryAdjustmentLineQuantityAdjustmentNewQuantity </strong></span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">We can also use the field InventoryAdjustmentLineQuantityAdjustmentNewQuantity to do the same job. Here is the sample code:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO </span><span style="font-family: Arial, Helvetica, sans-serif;"> InventoryAdjustmentLine (AccountRefListID, InventorySiteRefListID<span id="bb6acd21-e5bd-49e6-91d4-b1608de762fe" class="GINGER_SOFTWARE_mark">,&nbsp;</span>InventoryAdjustmentLineItemRefListID, <span style="color: #ff0000;">InventoryAdjustmentLineQuantityAdjustmentNewQuantity</span><span id="79384aa0-6866-4ef6-95f2-6285913ac235" class="GINGER_SOFTWARE_mark"> )</span> <br />VALUES ('1D0001-896819777', '80000001-1481799256','850003-1044569333'<span id="92a70892-7ce1-4e62-949d-187dbc60330d" class="GINGER_SOFTWARE_mark">,</span>6600) </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Value "6600" in the field stands for the quantity after adjustment; that's the only difference.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Here is the result in QODBC Test Tool:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2424/Q4.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Here is the result in QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2424/Q3.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">You can ignore the field "InventorySiteRefListID" <span id="0d6cda50-2340-41c8-abb8-be771ab57e11" class="GINGER_SOFTWARE_mark">if</span> you have not turned ON the&nbsp;<span id="5278085a-22b4-4295-b529-1ab4066a9ace" class="GINGER_SOFTWARE_mark">multiple</span> inventory sites feature in QuickBooks.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to apply a payment to an invoice ]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2423]]></link>
<guid isPermaLink="false"><![CDATA[af5d5ef24881f3c3049a7b9bfe74d58b]]></guid>
<pubDate><![CDATA[Tue, 07 Feb 2012 03:01:28 +0000]]></pubDate>
<dc:creator><![CDATA[Wilson (QODBC Support)]]></dc:creator>
<description><![CDATA[How to Pay an Existing Invoice
How to apply a payment to the Invoice 
Instructions
This article is about receiving payment and applying it to an existing invoice. But if you want to keep the payment as customer credit, please refer: How to Receive A Pa...]]></description>
<content:encoded><![CDATA[<p>How to Pay an Existing Invoice</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How to apply <span id="238a213b-b112-41b1-b89b-4b7c6726a4b2" class="GINGER_SOFTWARE_mark">a payment</span> to the Invoice </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This article is about receiving payment and applying it to an existing invoice. But if you want to keep the payment as customer credit, please refer: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/359">How to Receive A Payment not be applied to an Invoice <span id="0b012d32-6911-48ac-87ae-9cff984bb382" class="GINGER_SOFTWARE_mark">( </span>How to handle Customer credits on account<span id="942df649-6e7e-4f40-bdec-7f6cf0f729f8" class="GINGER_SOFTWARE_mark"> )</span> </a></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="5ca22efe-ef9e-4af0-b64c-23a9f2fec6db" class="GINGER_SOFTWARE_mark">Let's</span> take <span id="66ba7f23-d22b-4a8b-afc4-18c4768f9395" class="GINGER_SOFTWARE_mark">an</span> invoice called "west's test" in the&nbsp;<span id="7ec7bb7b-a229-4f40-8186-afd98451414b" class="GINGER_SOFTWARE_mark">sample company file</span> as an example to show how <span id="754268ae-ddd6-4853-88a3-6154a7bcb9e3" class="GINGER_SOFTWARE_mark">to do</span> it. Here is the detailed information about this information:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2423/Q1.png" alt="" /></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2423/Q2.png" alt="" /></span></p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Find the TxnID of the Invoice you want to pay </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="16496979-4503-4057-9857-b8ca6c31691f" class="GINGER_SOFTWARE_mark">First, you</span> need to find out the TxnID of the Invoice, the field <span id="4ef4ef53-5087-40fe-841d-1bfc90a1686d" class="GINGER_SOFTWARE_mark">RefNumber</span>, and CustomerRefFullName can be used as a filter.<span id="244206e5-df25-4de7-b46b-2f0dce95a98c" class="GINGER_SOFTWARE_mark"></span> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>SQL Statement</strong>: select * from invoiceLine Where RefNumber='2' AND CustomerRefFullName='West Test'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2423/Q3.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">In the example above, the TxnID is <span style="color: #ff0000;">8C79-1481790565</span></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Inserting the payment record </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Use the below statement to insert a payment record:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, total amount, <br /> <span id="c1c74401-1c51-476d-9728-9e9aca21823b" class="GINGER_SOFTWARE_mark">AppliedToTxnTxnID</span>, AppliedToTxnPaymentAmount, Memo)&nbsp;&nbsp; <br />Values ('80000083-1481808249','30000-896814907', 500.00, <span style="color: #ff0000;">'8C79-1481790565'</span>, 500.00, <br />'Payment for Invoice test')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2423/Q4.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Beware of the field BalanceRemaining. It indicates how much is left to pay. Usually, it is the same as the amount in the Invoice, but if you enabled the sales tax charge, this amount should be plus sales tax.</span></p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">QODBC Allows Invoice not Being Paid Fully </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The above statement's payment amount was entered as 500, which is less than the Balance Due. Let's see what we got after the execution of the above query: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Here is the result in QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2423/Q5.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">As you can see, the amount due has been decreased by 500. Let&rsquo;s finish the rest of the payment: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>SQL Statement:</strong> INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, TotalAmount, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, Memo) Values ('80000083-1481808249','30000-896814907', 362.65, '8C79-1481790565', 362.65, 'Payment for Invoice test') </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2423/Q6.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The Invoice is fully paid and is off the pending list. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2423/Q7.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><strong>NOTE:</strong></p>
<p>In case you are facing one of the following errors,&nbsp;</p>
<p>Object "43AC05E5-1352851019" specified in the request cannot be found.'</p>
<p>Please refer to&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2531/0/qodbc-desktop-troubleshooting-error-when-apply-payment-to-an-invoice-txnid-not-found">Error when applying the payment to an invoice 'TxnID' Not Found</a>. You may not have supplied&nbsp;ARAccountRefListID, or it may not match the invoice record.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Keywords:&nbsp;how to make payment through invoice using qodbc</span></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Find Purchase Order Closed Check Mark Data using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2413]]></link>
<guid isPermaLink="false"><![CDATA[72e6d3238361fe70f22fb0ac624a7072]]></guid>
<pubDate><![CDATA[Thu, 08 Sep 2011 08:04:00 +0000]]></pubDate>
<dc:creator><![CDATA[Juliet]]></dc:creator>
<description><![CDATA[How to Find Purchase Order Closed Check Mark Data using QODBC
Introduction
There is a closed check mark for a PurchaseOrder record or a given line item in a Purchase Order. Normally it's related to the fields "IsManuallyClosed" and "PurchaseOrderLineIsM...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">How to Find Purchase Order Closed Check Mark Data using QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Introduction</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">There is a closed check mark for a PurchaseOrder record or a given line item in a Purchase Order. Normally it's related to the fields "IsManuallyClosed" and "PurchaseOrderLineIsManuallyClosed" in the PurchaseOrder and PurchaseOrderLine table.</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">IsManuallyClosed and PurchaseOrderLineIsManuallyClosed</span></h3>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Purchase Order Closed </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The Field "IsManuallyClosed" in both tables PurchaseOrder and PurchaseOrderLine contains the whole purchase order closed status. If true, the purchase order is closed, and all the line items are closed.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Purchase Order Line Closed </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The Field "PurchaseOrderLineIsManuallyClosed" in table PurchaseOrderLine contains the closed status of every line item. Only if all the line items under a specified purchase order are closed is the purchase order automatically closed.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Print Invoices with Different Status using QODBC ]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2410]]></link>
<guid isPermaLink="false"><![CDATA[a6ea8471c120fe8cc35a2954c9b9c595]]></guid>
<pubDate><![CDATA[Tue, 30 Aug 2011 08:35:45 +0000]]></pubDate>
<dc:creator><![CDATA[Juliet]]></dc:creator>
<description><![CDATA[How to Print Invoices with Different Status using QODBC 
Note: There are two columns in the invoice table called "IsPending" and "IsPaid" you could give them the specified value to get the different statuses of Invoices.
You could try the queries below ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">How to Print Invoices with Different Status using QODBC </span></h2>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: There are two columns in the invoice table called "IsPending" and "IsPaid" you could give them the specified value to get the different statuses of Invoices.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You could try the queries below to print pending, unpaid, and paid invoices to a file.</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;"> Queries in QODBC</span></h3>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>UnPending Invoice </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT * FROM Invoice where IsPending=0</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Pending Invoice</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT * FROM Invoice where IsPending=1</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"> <strong>Unpaid Invoice</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT * FROM invoice where IsPaid=0</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"> <strong>Paid Invoice</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT * FROM invoice where IsPaid=1 </span></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Invoices using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2389]]></link>
<guid isPermaLink="false"><![CDATA[063e26c670d07bb7c4d30e6fc69fe056]]></guid>
<pubDate><![CDATA[Thu, 15 Jul 2010 09:08:55 +0000]]></pubDate>
<dc:creator><![CDATA[Juliet]]></dc:creator>
<description><![CDATA[Examples of Creating Invoice using QODBC 
 Note: For multi-line invoices, some may find it easier to NOT include the header information with each line item, but rather to have separate smaller commands for the Invoice Lines and a final INSERT for the Inv...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Examples of Creating Invoice using QODBC </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <strong>Note:</strong> For multi-line invoices, some may find it easier to NOT include the header information with each line item, but rather to have <span id="a0a24976-a8b6-48fe-ae8e-e3a5cfd67ba3" class="GINGER_SOFTWARE_mark">separate</span> smaller commands for the Invoice Lines and a final INSERT for the Invoice Header.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create an Invoice with 3 Lines</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Here we create an invoice with three lines by using 3 InvoiceLine INSERT commands (with the <span style="color: #ff0000;">FQSaveToCache</span> caching flag set true) followed by the Invoice table (header) insert, which is automatically designed to pull in all cached InvoiceLine records and save immediately.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Method 1: Insert line records followed by header information</strong></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"<span id="9e7ea2ad-6dfd-40c8-b004-1efa8e6341fc" class="GINGER_SOFTWARE_mark">InvoiceLineRate</span>", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"<span style="color: #ff0000;"><span id="458b8ae4-d6b6-4f23-ad3c-af6dbc4e89ea" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('670004-1044572237', 'Building permit 1', 1.00000, <br />1.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"<span id="c00ab32c-7b80-48e9-8d20-128818992add" class="GINGER_SOFTWARE_mark">InvoiceLineRate</span>", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"<span style="color: #ff0000;"><span id="7da3dd18-7bd7-4a10-ac92-db223e6367a6" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('670004-1044572237', 'Building permit 2', 2.00000, <br />2.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q2.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"<span id="da0ecd95-8027-4a34-aca8-6bb632ba3a14" class="GINGER_SOFTWARE_mark">InvoiceLineRate</span>", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"<span style="color: #ff0000;"><span id="eedd8f7a-29b3-4b8d-bc47-6e450a52add9" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('670004-1044572237', 'Building permit 3', 3.00000, <br />3.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q3.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Header Information </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "Invoice" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", <br />"RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", <br />"<span id="3daa2d40-616c-4ea4-8f55-a7c4563a81f0" class="GINGER_SOFTWARE_mark">BillAddressState</span>", "BillAddressPostalCode", "BillAddressCountry", <br />"IsPending", "TermsRefListID", "DueDate", "ShipDate", "ItemSalesTaxRefListID", <br />"Memo", "IsToBePrinted", "CustomerSalesTaxCodeRefListID") VALUES ('4C0000-1040154668', <br />'50001-896816252', {d'2021-12-22'}, '1', 'Brad Lamb', '1921 Appleseed <br />Lane', 'Bayshore', 'CA', '94326', 'USA', 0, '50000-898307888', <br />{d'2021-12-22'}, {d'2021-12-31'}, '80000097-1481806775', 0, <br />'10000-1011136881')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q4.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Results in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q5.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Method 2: Header &amp;&nbsp;Line information in a single SQL statement&nbsp;</strong></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate",&nbsp;<br />"RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity",&nbsp;<br />"<span id="3daa2d40-616c-4ea4-8f55-a7c4563a81f0" class="GINGER_SOFTWARE_mark">BillAddressState</span>", "BillAddressPostalCode", "BillAddressCountry",&nbsp;<br />"IsPending", "TermsRefListID", "DueDate", "ShipDate", "ItemSalesTaxRefListID",&nbsp;<br />"Memo", "IsToBePrinted", "CustomerSalesTaxCodeRefListID","InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"<span id="9e7ea2ad-6dfd-40c8-b004-1efa8e6341fc" class="GINGER_SOFTWARE_mark">InvoiceLineRate</span>", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"<span style="color: #ff0000;"><span id="458b8ae4-d6b6-4f23-ad3c-af6dbc4e89ea" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('4C0000-1040154668',&nbsp;<br />'50001-896816252', {d'2021-12-22'}, '1', 'Brad Lamb', '1921 Appleseed&nbsp;<br />Lane', 'Bayshore', 'CA', '94326', 'USA', 0, '50000-898307888',&nbsp;<br />{d'2021-12-22'}, {d'2021-12-31'}, '80000097-1481806775', 'Memo Test', 0,&nbsp;<br />'10000-1011136881','670004-1044572237', 'Building permit 1', 1.00000, <br />1.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q6.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate",&nbsp;<br />"RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity",&nbsp;<br />"<span id="3daa2d40-616c-4ea4-8f55-a7c4563a81f0" class="GINGER_SOFTWARE_mark">BillAddressState</span>", "BillAddressPostalCode", "BillAddressCountry",&nbsp;<br />"IsPending", "TermsRefListID", "DueDate", "ShipDate", "ItemSalesTaxRefListID",&nbsp;<br />"Memo", "IsToBePrinted", "CustomerSalesTaxCodeRefListID","InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"<span id="c00ab32c-7b80-48e9-8d20-128818992add" class="GINGER_SOFTWARE_mark">InvoiceLineRate</span>", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"<span style="color: #ff0000;"><span id="7da3dd18-7bd7-4a10-ac92-db223e6367a6" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('4C0000-1040154668',&nbsp;<br />'50001-896816252', {d'2021-12-22'}, '1', 'Brad Lamb', '1921 Appleseed&nbsp;<br />Lane', 'Bayshore', 'CA', '94326', 'USA', 0, '50000-898307888',&nbsp;<br />{d'2021-12-22'}, {d'2021-12-31'}, '80000097-1481806775', 'Memo Test', 0,&nbsp;<br />'10000-1011136881','670004-1044572237', 'Building permit 2', 2.00000, <br />2.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q7.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate",&nbsp;<br />"RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity",&nbsp;<br />"<span id="3daa2d40-616c-4ea4-8f55-a7c4563a81f0" class="GINGER_SOFTWARE_mark">BillAddressState</span>", "BillAddressPostalCode", "BillAddressCountry",&nbsp;<br />"IsPending", "TermsRefListID", "DueDate", "ShipDate", "ItemSalesTaxRefListID",&nbsp;<br />"Memo", "IsToBePrinted", "CustomerSalesTaxCodeRefListID","InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"<span id="da0ecd95-8027-4a34-aca8-6bb632ba3a14" class="GINGER_SOFTWARE_mark">InvoiceLineRate</span>", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"<span style="color: #ff0000;"><span id="eedd8f7a-29b3-4b8d-bc47-6e450a52add9" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('4C0000-1040154668',&nbsp;<br />'50001-896816252', {d'2021-12-22'}, '1', 'Brad Lamb', '1921 Appleseed&nbsp;<br />Lane', 'Bayshore', 'CA', '94326', 'USA', 0, '50000-898307888',&nbsp;<br />{d'2021-12-22'}, {d'2021-12-31'}, '80000097-1481806775', 'Memo Test', 0,&nbsp;<br />'10000-1011136881','670004-1044572237', 'Building permit 3', 3.00000, <br />3.00, '10000-1011136881', <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q8.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Results in QuickBooks </strong></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q9.png" alt="" /></span></p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">To Find Related Data Location </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="1edee6aa-a2c4-410a-b36a-45e4f42b41c7" class="GINGER_SOFTWARE_mark">InvoiceLineItemRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="41838a42-b8a5-4d33-b403-68b058dbb742" class="GINGER_SOFTWARE_mark">InvoiceLineItemRefListID</span> is '670004-1044572237' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select <span id="259a73f5-3049-49ad-8f1a-264c4b7d01ae" class="GINGER_SOFTWARE_mark">ListId</span>, FullName from <span style="color: #0000ff;">Item</span> where <span id="68e70bbb-04c7-415d-bd49-e8d3cb065e41" class="GINGER_SOFTWARE_mark">FullName</span> like 'I%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q10.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="b24f92cb-0a84-4ca0-95ae-541bc7035faf" class="GINGER_SOFTWARE_mark">InvoiceLineSalesTaxCodeRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="18c36acb-d9fe-41b8-9173-266e437e0fc5" class="GINGER_SOFTWARE_mark">InvoiceLineSalesTaxCodeRefListID</span> is '10000-1011136881' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select <span id="c564fe8a-102d-4e26-948c-c6fc6cd493e6" class="GINGER_SOFTWARE_mark">ListId</span>, Name from <span style="color: #0000ff;">SalesTaxCode</span> where Name like 'T%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q11.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="7c64ef3d-1f2a-4900-9bb4-29c02ac6b38a" class="GINGER_SOFTWARE_mark">CustomerRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="6f72d535-3e08-4d5d-831f-0dd516a69900" class="GINGER_SOFTWARE_mark">CustomerRefListID</span> is '4C0000-1040154668' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select <span id="b0c27605-e296-49f9-9440-14f8ece8af21" class="GINGER_SOFTWARE_mark">ListId</span>, FullName from <span style="color: #0000ff;">Customer</span> where <span id="7b03a4c6-9337-421b-92df-ad4f6588e3d5" class="GINGER_SOFTWARE_mark">FullName</span> like 'Pete%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q12.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="505d59a2-ea99-4682-a24c-ba3ada0ea829" class="GINGER_SOFTWARE_mark">ARAccountRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="da7e0de9-a47e-4897-b803-9ada8d40581b" class="GINGER_SOFTWARE_mark">ARAccountRefListID</span> is '50001-896816252' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select <span id="cc58428b-d0f2-4817-956c-04cdfea256cc" class="GINGER_SOFTWARE_mark">ListId</span>, Name from <span style="color: #0000ff;">Account</span> where Name like 'Account%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q13.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="bca21bac-07bd-485e-979c-1f1c9149e9d4" class="GINGER_SOFTWARE_mark">ItemSalesTaxRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="283919b1-fdec-4bae-82f3-1af6c5a2c677" class="GINGER_SOFTWARE_mark">ItemSalesTaxRefListID</span> is '80000097-1481806775' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select <span id="7d9e8bc0-9b62-430c-999f-756951a5877e" class="GINGER_SOFTWARE_mark">ListId</span>, Name from <span style="color: #0000ff;">ItemSalesTax</span> where Name like 'G%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q14.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong><span id="9ddfca49-bb14-4946-9c5b-eceea9839390" class="GINGER_SOFTWARE_mark">CustomerSalesTaxCodeRefListID</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="abddc888-82df-49b8-a3ff-8a5d794e388e" class="GINGER_SOFTWARE_mark">CustomerSalesTaxCodeRefListID</span> is '10000-1011136881' and found like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select <span id="1e09ae30-4c3a-4074-9ef3-6bfd951e2880" class="GINGER_SOFTWARE_mark">ListId</span>, Name from <span style="color: #0000ff;">SalesTaxCode</span> where Name like 'T%'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2389/Q15.png" alt="" /></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Hi, I followed the example you gave in the Knowledgebase. It works, but how do I change the above code so I can enter any of my current customers instead of the example " Brad Lamb "above?</span></p>
<p>&nbsp;</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can manually change the value in the query or insert records through the local access table; you need to write VBA scripts that will fetch data from a local access table and perform the insert operation in QuickBooks using QODBC.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Please refer to the below-mentioned article for the Sample VBA code:</span></p>
<p><a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2571">Using QuickBooks Data with VBA</a></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to perform INSERTs, UPDATEs, and DELETEs using OPENQUERY with Linked MS SQL Servers]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2367]]></link>
<guid isPermaLink="false"><![CDATA[300891a62162b960cf02ce3827bb363c]]></guid>
<pubDate><![CDATA[Tue, 16 Mar 2010 08:35:48 +0000]]></pubDate>
<dc:creator><![CDATA[Juliet]]></dc:creator>
<description><![CDATA[Note: OpenQuery requires a result set to be returned, but UPDATE, DELETE, and INSERT statements used with OpenQuery and QODBC do not return a result set.
WORKAROUND
&nbsp;&nbsp;&nbsp;&nbsp; You can work around this problem in the following two ways: 
U...]]></description>
<content:encoded><![CDATA[<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: OpenQuery requires a result set to be returned, but UPDATE, DELETE, and INSERT statements used with OpenQuery and QODBC do not return a result set.</span></p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6633cc;">WORKAROUND</span></span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; You can work around this problem in the following two ways: </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Use four-part names </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Can use four-part names (linked_server_name.catalog.schema.object_name) to do insert, update, or delete operations, such as:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; SELECT ListID, Name FROM QODBC...Customer</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; <strong>Note</strong>: In this example, I'm only using the linked_server_name "QODBC," so it's followed with three full stops.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">With the SQL Server OLE DB provider</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; As documented in SQL Server Books Online, reference the OpenQuery function as the target table of an INSERT, UPDATE, or DELETE statement, subject to the capabilities of the OLE DB provider. The following queries demonstrate proper usage with the SQL Server OLE DB provider: </span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>UPDATE OEPNQUERY</strong></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Update openquery(QODBC, 'select InvoiceLineDesc from InvoiceLine WHERE TxnID = ''6130-1197786604'' And InvoiceLineTxnLineID = ''7133-1197736106'' ') SET InvoiceLineDesc = 'New Desc 10001'</span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Note: There are two single quotes (') around the value (i.e. 6130-1197786604 &amp; 7133-1197736106) not double quote (").</span>&nbsp;</p>
<p><strong style="color: #990000; font-family: Arial, Helvetica, sans-serif;">INSERT OPENQUERY</strong></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Insert openquery(QODBC, 'select Name,LastName,FirstName,BillAddressAddr1,BillAddressAddr2,BillAddressCity,BillAddressState,<br />BillAddressPostalcode from customer where ListID=''0''') values ('Zuniga Daphne', 'Zuniga', 'Daphne', 'Daphne Zuniga', '561 W 4th St.', 'Carlsbad', 'CA', '92009')</span></p>
<h4><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of creating a new Invoice</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Insert openquery(QRemote, 'select CustomerRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineAmount, InvoiceLineSalesTaxCodeRefListID from InvoiceLine where TxnID=''0''') values ('670000-1071517519', '7047', '320000-1071525597', 'POWER TRAK-2000', 1, 130,'20000-999022286')</span></p>
<h4><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of adding InvoiceLine item to an existing Invoice</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Insert openquery(QRemote, 'select TxnID, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount from InvoiceLine where TxnID=''0''') values ('1B308-1513325705','320000-1071525597', '88880DECA', 5,5)</span></p>
<p><strong><span style="font-family: Arial, Helvetica, sans-serif;">OR</span></strong></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Insert&nbsp;into QRemote...InvoiceLine (TxnID, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineAmount) VALUES ('1B308-1513325705','320000-1071525597', '11440DECA', 5,5)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>DELETE OPENQUERY</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Delete openquery(QODBC, 'select ListID from customer where ListID = ''300000-1081400329'' ')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Note: There are two single quotes (') around the value (i.e., 300000-1081400329), not double&nbsp;quotes&nbsp;(").<br /></span></p>
<p><span style="color: #003366;"><strong><span style="color: #000000;">Note</span></strong>:</span><span style="font-family: Arial, Helvetica, sans-serif;"> In the INSERT statement, a where should be either ListID =''0'' or TxnID=''0''&nbsp;depending on your query field. The&nbsp;ListID =''0'' or TxnID=''0'' predicate is used to avoid retrieving data from the remote server, resulting in slower performance. Also, UPDATE and DELETE operations have special QODBC requirements.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See also:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2514" target="_blank">How to create a Link Server with MS SQL 2005/2008/2012 32-bit Using QODBC/QRemote</a></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2458" target="_blank">How to create a Link Server with MS SQL 2005/2008/2012 64-bit Using QODBC/QRemote</a></span>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description:</span></h3>
<p>I have a QODBC stored procedure that I have proved and tested in the QODBC 32-bit Test Tool. Now, I need to call it from a SQL command while specifying the linked server. Can you provide an example SQL statement?</p>
<p>&nbsp;</p>
<p>sp_columns and sp_columns_ex are returning no records using the QODBC driver and SQL Server. Other queries are returning data.&nbsp;</p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solutions:</span></h3>
<p>You can execute sp_report from SQL Server using the below sample query:</p>
<p>For Example:</p>
<p>select * from openquery (YourLinkedServerName, 'sp_report salesbyrepsummary show label, amount_1 date parameters DateMacro = ''Today''')</p>
<p>select&nbsp;* from&nbsp;openquery&nbsp;(QRemote, 'sp_columns Account')&nbsp;</p>
<p>select&nbsp;* from&nbsp;openquery&nbsp;(QRemote, 'sp_report&nbsp;salesbyrepsummary&nbsp;show label, amount_1 date parameters DateMacro = ''Today''')&nbsp;</p>
<p>select * from openquery (QRemote,'sp_report PurchaseByItemDetail show TxnType_Title, Date_Title, RefNumber_Title, Memo_Title, SourceName_Title, Quantity_Title, UnitPrice_Title, Amount_Title, RunningBalance_Title, Text, Blank, TxnType, Date, RefNumber, Memo, SourceName, Quantity, UnitPrice, Amount, RunningBalance parameters DateMacro = ''ThisMonthToDate''')</p>
<p>select&nbsp;* from&nbsp;openquery&nbsp;(QRemote,'sp_report ProfitAndLossStandard show Text, Label, Amount_1 as Amount, Amount_1_Title as "As of" parameters DateMacro = ''ThisMonthToDate'', SummarizeColumnsBy = ''TotalOnly'')</p>
<p>In the same way, you can run other reports. You can change parameters &amp; report columns as per your requirements.&nbsp;<br /><br />Please refer:</p>
<p><a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2369/0/how-to-use-the-quickbooks-reporting-engine-with-qodbc">How to use the QuickBooks Reporting Engine with QODBC</a><br /> <br />Please refer to the mentioned link to get details about the QODBC table &amp; report schema. You will get information on each report column parameters which are supported:&nbsp;</p>
<p><a href="http://www.qodbc.com/schema.htm">QODBC Data Layouts</a></p>
<p>&nbsp;</p>
<p><strong>Select</strong></p>
<p>Select * from QRemote&hellip;Account</p>
<p>or</p>
<p>select * from OpenQuery (QRemote, 'select * from Account')</p>
<p>Note: If your SQL statement contains a where clause, use OpenQuery. When using OpenQuery 'where' clause (filters) will be sent to QODBC, and data retrieval will be faster.</p>
<p>Example:</p>
<p>select * from OpenQuery (QRemote, 'select * from Account where FullName=''MyAccount''')</p>
<p>&nbsp;</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6633cc;">Setup of Optimizer When Using OPENQUERY</span></span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The QODBC optimizer is a single user only, so you need to set up a different optimizer file&nbsp;for the SQL Server to use than the other desktop applications. To do this, step up a separate System DSN (see: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1929">How do I create or configure a QODBC DSN?</a>) and specify a fixed location of the optimizer database folder for SQL Server to use instead of the default %AppData% method.</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/QODBC-Setup-Enterprise/Optimizer.PNG" alt="" /></span></p>
<p>&nbsp;</p>
<p>Keywords:&nbsp;SQL server update table&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop]  How do I build a connection string with all the available QODBC parameters / Connection String with QODBC Parameters]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2347]]></link>
<guid isPermaLink="false"><![CDATA[b23975176653284f1f7356ba5539cfcb]]></guid>
<pubDate><![CDATA[Tue, 03 Nov 2009 06:27:41 +0000]]></pubDate>
<dc:creator><![CDATA[Juliet]]></dc:creator>
<description><![CDATA[General Connection String
Instructions
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The most challenging part of using QODBC in programming is the connection string. The simplest form includes a reference to a DSN. A system DSN called "QuickBooks Data" is automatical...]]></description>
<content:encoded><![CDATA[<h2><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6633cc;">General Connection String</span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The most challenging part of using QODBC in programming is the connection string. The simplest form includes a reference to a DSN. A system DSN called "QuickBooks Data" is automatically created when QODBC is installed. "QuickBooks Data" will be used in all examples but can be substituted for any different DSN name you make.<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Normally ADO pools connections. QODBC does <span style="color: #ff0000;">not</span> support connection pooling. It is recommended to tell ADO not to do connection pooling on any QODBC connection. This is done with OLE DB Services=-2.</span></p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">Parameters available on the connection string</span></span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><!--mstheme--> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <span style="color: #0000cc;">DFQ</span> = Path to company file or. (dot) to indicate the currently open company file. <!--mstheme--> <!--msthemelist--> <!--msthemelist--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <!--mstheme--> <span style="color: #0000cc;">OpenMode</span> = F (Follow Company) / M (Multi-user) / S (Single-user). <!--mstheme--> <!--msthemelist--> <!--msthemelist--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <!--mstheme--> <span style="color: #0000cc;">DeveloperCode</span> = This is for users of the QODBC v5 OEM version only. It is required to connect to the OEM licensing model. The Code is given to you when you purchase a QODBC v5OEM licensing pack. <!--mstheme--> <!--msthemelist--> <!--msthemelist--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /> <!--mstheme--> <span style="color: #0000cc;">ColumnNameLen</span> = This number specifies the maximum length a column name can be. Using this is required in some development environments. Its use will make the returned column names not match the normally defined schema. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OLE DB Services</span>=-2</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerOn</span> = Yes / No<!--mstheme--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">UseCaseSensitiveRefNumber</span> = Yes / No <!--msthemelist--> <!--msthemelist--> <!--mstheme--> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Example of simple DSN</span></strong><br />sConnectString = "DSN=QuickBooks Data;OLE DB Services=-2;"<br /> <br /> <strong><span style="color: #990000;">Example of a DSNless connection string</span></strong><br />sConnectString = "Driver={QODBC Driver for QuickBooks};DFQ=C:\Users\Public\Documents\Intuit\QuickBooks\Sample Company Files\QuickBooks Enterprise Solutions 14.0\sample_service-based business.qbw;OpenMode=M;OLE DB Services=-2;"<br /> <br /> <span style="color: #990000;"><strong>Example of using current ADO syntax</strong></span><br />sConnectString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=QuickBooks Data;OLE DB Services=-2;"</span></p>
<p><span style="font-family: Verdana;"><span style="color: #820000;"><strong><span style="color: #990000;">Standard syntax</span></strong><br /> </span>"DRIVER={QODBC Driver for QuickBooks};SERVER=QODBC;DFQ=.;OLE DB Services=-2;OptimizerOn=No;"</span><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Additional Parameters for QuickBooks Online Edition (QBOE)</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Parameters Added for QBOE </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizOEConnection</span> = Yes / No</span><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizOETicketGUID</span> = GUID from web login<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizOEPromptForLogin</span> = Yes / No</span></p>
<p><span style="color: #990000; font-family: Verdana;"><strong>A complete Example using the QODBC Remote Connector in the connection string</strong></span></p>
<p><span style="font-family: Verdana;">DRIVER={QODBC Driver for QuickBooks};OptimizerDBFolder=%AppData%\QODBC Driver for QuickBooks\Optimizer;IBizRemotePWD=123456;IBizRemoteConnect=Yes;IBizRemoteURL=http://192.168.1.10:2080; IBizRemoteConnTimeOut=120;IBizRemotePromptForPWD=No;IBizRemoteForce2002_2003=Yes; OpenMode=M;DFQ=C:\QBOOKSDW.QBW;OLE DB Service=-2</span></p>
<p>&nbsp;</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <span style="color: #6633cc;">Additional Text Field Handling Parameters in Connection String </span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Text Field Handling has been added to QODBC v7.00.00.204 and later. Convert Fields &gt; 255 to LONG VARCHAR and Limit length to 4096 characters (default): These fields help some development environments get data from long fields that would not be able to otherwise. Connection string options include:</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Parameters Added in Connection String </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">ConvertToLongVARCHAR</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">MaxLONGVARCHAR</span> = 4096<br /> <br /> </span></p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Parameters in Connection String for QODBC v9 </span></h2>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">General Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">DFQ</span> =. (Or company file full path)<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OpenMode</span> = F / M / S</span></p>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">Server Edition Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">UseDCOM</span> = Yes / No </span></p>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">RDS Server Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">UseRDS</span> = Yes / No </span></p>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">Remote Connector Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemoteConnect</span> = Yes / No <br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemoteURL</span> =<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemoteUID</span> =<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemotePWD</span> = <br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemoteSSLServerCert</span> =<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemotePromptForPWD</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemoteConnTimeOut</span> = <br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizRemoteForce2002_2003</span> = Yes / No</span></p>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">Online Edition Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizOEConnection</span> = Yes / No <br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizOETicketGUID</span> = (Connection Key)<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizOELoginGUID</span> = (Login Key)<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizOEPromptForLogin</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IBizReconnectionDelay</span> = </span></p>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">Optimizer Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerOn</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerCurrency</span> = M (Manual) / O (Per Connection) / Y (Yesterday) / L (Last Month) / R (Per Connection with a Reload first) / C (Current meaning every query)<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerDBFolder</span> =<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerEncryptionOn</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerForceDelete</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerAllowDirtyReads</span> = N (Nulls) / D (Dirty) / R (Read direct)<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerSyncAfterUpdate</span> = Yes / No</span></p>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">Advance Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">ColumnNameLen</span> = <br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">NumberCustomFields</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">UseCaseSensitiveRefNumber</span> = Yes / No</span><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">UseODBCCompatibility</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">UseSimulatedTransactions</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">FileNameCase</span> = Upper / Lower<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">UseIterators</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IteratorChunkSize</span> = <br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IAppLaunchQBUI</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IAppAutomaticLogin</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IAppReadOnly</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">IAppAllowPersonalData</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">ConvertToLongVARCHAR</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">MaxLONGVARCHAR</span> =</span><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">SyncFromOtherTables</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">NoIncludeRaw</span> = Yes / No </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">ODBCINST.INI settings </span></h3>
<h4><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">Messages Tab</span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">DebugPanel</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">ShowICON</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">ShowICONWarnings</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">OptimizerPanel</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">VerboseOptimizerPanel</span> = Yes / No<br /> <img src="http://archive.qodbc.com/www.qodbc.com.au/_themes/ibmred_3flashs/bullet1.gif" alt="bullet" width="7" height="7" hspace="17" /><span style="color: #0000cc;">TracingOn</span> = Yes</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Also, Refer:&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2681" target="_blank">How I build a connection string with all the available QRemote parameters / Connection String with QRemote Parameters.</a></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] A detailed tutorial about how to create a multi-line Invoice]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2346]]></link>
<guid isPermaLink="false"><![CDATA[777669af68dbccabc30c3b6bcaa81825]]></guid>
<pubDate><![CDATA[Thu, 29 Oct 2009 09:16:54 +0000]]></pubDate>
<dc:creator><![CDATA[Juliet]]></dc:creator>
<description><![CDATA[Note: Here, I take " How do I create a multi-line invoice using QODBC with a blank line between two items for a job" as an example to tell the detailed steps of creating a multi-line invoice. 
 Step 1 - Find the Template ListID&nbsp;
Preparation &nbsp;&...]]></description>
<content:encoded><![CDATA[<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Here, I take " How do I create a multi-line invoice using QODBC with a blank line between two items for a job" as an example to tell the detailed steps of creating a multi-line invoice. </span></p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.dataaccess.com.au/menu/Images/arrowbullet2.gif" alt="" /> <span style="color: #6633cc;"><strong>Step 1 - Find the Template ListID</strong></span></span><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></h2>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">Preparation</span></span><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;"> With your QuickBooks company file open, click on "Start" and "Programs" and locate QODBC Driver for the QuickBooks program group. Click on the <strong>QODBC Test Tool</strong> icon to launch the program supplied with QODBC. To establish a connection, select the "QuickBooks Data" DSN from the dropdown list, and Click on "Connect.&rdquo;</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to find the Template ListID </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;"> When creating an invoice, you can select which Invoice Template to use by including a "<strong><span style="color: #990033;">TemplateRefListID</span></strong>" column in the <span id="67fd0723-01e8-425b-8a58-b4928b82056c" class="GINGER_SOFTWARE_mark">InvoiceLine</span> insert statement. To determine what template ListID are available to you, run the following query in VBDemo:</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><br /> <br /> <span style="font-size: 10pt;"><strong>SELECT * FROM Template</strong></span><br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;">Click on the Run button. In my case, my QuickBooks 2022 sample file returned the following templates:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><img src="https://support.flexquarters.com/esupport/newimages/2346/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to use the Template ListID </span><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp; To use the <strong><span style="color: #000000;">Stadium Tax</span></strong> invoice template, we use the <strong><span id="ce5042b4-859a-4973-8174-0758d556514b" class="GINGER_SOFTWARE_mark">ListID</span></strong>:'A0000-1045701421' (in Row 9 above), like <span id="52091d77-99cd-4390-94a9-f573b702412c" class="GINGER_SOFTWARE_mark">this</span> in InvoiceLine SQL insert statements:<br /> <br />INSERT INTO "InvoiceLine" ("CustomerRefListID", "<strong>TemplateRefListID</strong>","RefNumber", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineTaxCodeRefListID","FQSaveToCache") VALUES ('300000-1081400329','<strong>A0000-1045701421</strong>','56', '90000-1045537150', '4m Steel Ladder', 1.00000, 150.00, '90000-1045536338', 0)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp; You can substitute the <strong>TemplateRefListID </strong>with the <strong>ListID</strong> value of whatever Invoice Template type you would like to use.</span></p>
<p>&nbsp;</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.dataaccess.com.au/menu/Images/arrowbullet2.gif" alt="" /> <span style="color: #008000;"><strong><span style="color: #6633cc;">Step 2 - Find the Customer Job <span id="c8bb0127-7418-4e91-a2ed-6c85070c4d3e" class="GINGER_SOFTWARE_mark">ListID</span></span></strong></span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to find the Customer Job <span id="82505fb4-3397-49bb-82b0-3fcdf163b379" class="GINGER_SOFTWARE_mark">ListID</span> </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; In QuickBooks, job invoices are created by invoicing a customer, followed by the job name or number. For this example, I created job number 1000 for Acmer Pty Ltd. In QuickBooks, jobs are separated by a ":," and I would use "Acmer Pty Ltd<strong><span id="8fb09b75-894b-4011-bf56-5f66d9a8e2ea" class="GINGER_SOFTWARE_mark">:</span></strong>1000" to raise invoices against the positijobn 1000. What you need to do is find the "<strong><span style="color: #990033;">CustomerRefListID</span></strong>" for the job you want to create an invoice for by running the following query in QODBC Test Tool:<br /> <br /> <strong>SELECT * FROM Customer</strong><br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; In my case, my QuickBooks 2022 sample file returned the following customers:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><img src="https://support.flexquarters.com/esupport/newimages/2346/Q2.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to use the Customer Job <span id="23111250-b159-4e9a-979c-afacfbeddc7e" class="GINGER_SOFTWARE_mark">ListID</span> </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">&nbsp;&nbsp;&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp; I'm interested in the job: "Acmer Pty Ltd:1000". <span id="9c7ad884-616e-4908-b023-a0eab1de9037" class="GINGER_SOFTWARE_mark">For</span> Job 1000, we use the <strong><span id="859232d1-749c-49cf-aa77-277c630812a5" class="GINGER_SOFTWARE_mark">ListID</span></strong>:'300000-1081400329' (in Row 2 above), like this in InvoiceLine SQL insert statements:<br /> <br />INSERT INTO "InvoiceLine" ("<strong>CustomerRefListID</strong>", "TemplateRefListID","RefNumber", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineTaxCodeRefListID","FQSaveToCache") VALUES ('<strong>300000-1081400329</strong>','A0000-1045701421','56', '90000-1045537150', '4m Steel Ladder', 1.00000, 150.00, '90000-1045536338', 0)</span></p>
<p>&nbsp;</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.dataaccess.com.au/menu/Images/arrowbullet2.gif" alt="" /> <span style="color: #6633cc;"><strong>Step 3 - Create the Job Invoice</strong></span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to find the InvoiceLineItemRefListID</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Now that we know the "<strong>TemplateRefListID</strong>" for the Invoice Template we want to use and the "<strong>CustomerRefListID</strong>" for the job we want to create an invoice for, it's time to make the actual multi-line invoice by running three SQL insert statements. What we also need to do is find the "<strong><span style="color: #990033;">InvoiceLineItemRefListID</span></strong>" for all the items we want to invoice against the job by running the following query in QODBC Test Tool:<br /> <br /> <strong>SELECT <span id="e0439887-654b-4695-b7f5-97da2e2cbdf7" class="GINGER_SOFTWARE_mark">ListID</span>, FullName, Description, Type FROM Item</strong><br /> <br />In my case, my QuickBooks 2022 sample file returned the following items:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><img src="https://support.flexquarters.com/esupport/newimages/2346/Q3.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;I'm interested in the following Inventory Items: <br />&nbsp; &nbsp; &nbsp; &nbsp; "4m Steel Ladder" <strong>ListID:'90000-1045537150</strong>' and<br />&nbsp; &nbsp; &nbsp; &nbsp; "Paint Brush<span id="4cc662cf-620f-4718-b5f7-1896f10996ba" class="GINGER_SOFTWARE_mark">:</span>Big" <strong>ListID:'150001-1045625669</strong>'&nbsp;</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to create a Job Invoice</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;"> To create a job invoice with <span id="0861e743-441b-4578-ae9f-3781db30aea0" class="GINGER_SOFTWARE_mark">an</span> "<strong>EMPTY</strong>" InvoiceLine line between two invoice lines, run each of these insert statements in QODBC Test Tool one after each other without disconnecting like this:<br /> <br /> <span style="color: #990033;"><strong>1st SQL Statement</strong></span><br />INSERT INTO "InvoiceLine" ("CustomerRefListID", "TemplateRefListID","RefNumber", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineTaxCodeRefListID","<strong>FQSaveToCache</strong>") VALUES ('300000-1081400329','A0000-1045701421','56', '90000-1045537150', '4m Steel Ladder', 1.00000, 150.00, '90000-1045536338', <strong>1</strong>)<br /> <br /> <span style="color: #990033;"><strong>2nd SQL Statement</strong></span><br />INSERT INTO "InvoiceLine" ("InvoiceLineDesc", "<strong>FQSaveToCache</strong>") VALUES (<strong>''</strong>, <strong>1</strong>)<br /> <br /> <span style="color: #990033;"><strong>3rd SQL Statement</strong></span><br />INSERT INTO "InvoiceLine" ("CustomerRefListID", "TemplateRefListID","RefNumber", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineTaxCodeRefListID","<strong>FQSaveToCache</strong>") VALUES ('300000-1081400329','A0000-1045701421','56', '150001-1045625669', 'Paint Brush<span id="7b4d3695-aa30-4e5e-8fdd-ae214173ea67" class="GINGER_SOFTWARE_mark">:</span>Big', 1.00000, 11.60, '90000-1045536338', <strong>0</strong>)</span></p>
<p>&nbsp;</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.dataaccess.com.au/menu/Images/arrowbullet2.gif" alt="" /> <span style="color: #6633cc;"><strong>Step 4 - View the Job Invoice in QuickBooks</strong></span></span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp; </span><span style="font-family: Arial, Helvetica, sans-serif;">After running each of the insert scripts in Step 3, when I looked up Tax Invoice# 56 in QuickBooks, I found an Invoice for the job "1000" with two line items with a space between them, just like the user wanted:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2346/Q4.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt;"><strong>Note</strong>: </span><span style="font-family: Arial, Helvetica, sans-serif;">Further examples of QODBC SQL Scripts for QuickBooks Transactions <span id="08c7f161-5297-432f-a4f9-d3f714e6c571" class="GINGER_SOFTWARE_mark">may be</span> found with these FAQs. To create QuickBooks transactions using QODBC, you must have either a 30 Day QODBC Evaluation or a QODBC Pro Read Write license. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The examples and screen dump shown here are from the Australian edition of QuickBooks. USA, Canadian, and UK versions of QuickBooks differ in appearance and operation. However, the technique shown still applies.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #ff0000;">IMPORTANT NOTE</span></strong>: InvoiceLineTaxCodeRefListID should be used outside USA only. In USA use InvoiceLineSalesTaxCodeRefListID instead.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create multiple lines in the Invoice, Purchase and Journal table]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2345]]></link>
<guid isPermaLink="false"><![CDATA[81b073de9370ea873f548e31b8adc081]]></guid>
<pubDate><![CDATA[Thu, 29 Oct 2009 07:26:24 +0000]]></pubDate>
<dc:creator><![CDATA[Juliet]]></dc:creator>
<description><![CDATA[Note: The primary rule is first to save the data to the child record. The child record for each parent/child pair has all the data required by the parent record.
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Below are some SQL Commends examples...]]></description>
<content:encoded><![CDATA[<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: The primary rule is first to save the data to the child record. The child record for each parent/child pair has all the data required by the parent record.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Below are some SQL Commends examples of various types of updates.</span></p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Creating Lines in Invoice Table</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of creating one line item Invoice </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you need to create a one-line item invoice, for example, you can use a format that is the simplest form of invoice creation similar to this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", <br />"InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", <br />"InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID") VALUES <br />('470001-1071525403', '1', '250000-933272656', 'Building permit 1', <br />1.00000, 1.00, '20000-999022286')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: The above transaction inserts all required data in the InvoiceLine table to create a complete record in the InvoiceLine table and the Invoice header table and immediately saves the completed invoice record. </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions on the working principle of creating Multi-line Invoices </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Multi-line invoices require a series of SQL statements to complete a single invoice. In the example below, we are producing a 3-line invoice using 3 SQL INSERT commands in sequence. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The key to this process is the field named "<span style="color: #990033;">FQSaveToCache</span>." This field is not part of the table but is used as a flag to the QODBC driver. In the sequence below, you should note that the value of "FQSaveToCache" is set to 1 or TRUE for the first two line item insert statements, and then it is set to 0 or FALSE for the final statement.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A <span style="color: #990033;">TRUE</span> setting of "FQSaveToCache" instructs QODBC to take the values from your INSERT statement and hold them for later processing but not to save them to QuickBooks yet. When QODBC receives the final transaction where the cache is set to <span style="color: #990033;">0</span> or <span style="color: #990033;">FALSE</span>, the contents of the current INSERT statement will be combined with all of the previous INSERT statements held in the cache for this connection saved as a batch into QuickBooks.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QODBC maintains a connection for each application using the driver. This cache is specific for each link, so multiple applications or users of QODBC will not interfere with the cached transactions of other users. There is no limit to the number of lines cached for a single transaction other than what QuickBooks would limit you to.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Since the data on the INSERT statement is being cached and not written to QuickBooks, some application tools (most notably Microsoft Access) will re-check that the data was correctly saved to the target database by running a SELECT statement following a successful INSERT statement. In this example, this re-check will fail.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To get around this, use a pass-thru query (Append Query) and ignore any errors in the processing of the transaction, except for the last one. After the final line has been saved and the record is inserted into QuickBooks, you can do your validation by Selecting the results of the Invoice number you just created in the Invoice and InvoiceLine tables to see that it was inserted correctly.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Examples of creating multiple lines in the invoice </span></h3>
<p><strong><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Example with header information in each line item insert </span></strong></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", <br />"InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", <br />"InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") <br />VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 1', <br />1.00000, 1.00, '20000-999022286', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", <br />"InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", <br />"InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") <br />VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 2', <br />2.00000, 2.00, '20000-999022286', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", <br />"InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", <br />"InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") <br />VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 3', <br />3.00000, 3.00, '20000-999022286', 0)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Example with header information in Invoice table insert </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For multi-line invoices, some may find it easier not to include the header information with each line item but to have separate smaller commands for the Invoice Lines and a final INSERT for the Invoice Header. This will also work as in the example below.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Here we create an invoice with three lines by using 3 InvoiceLine INSERT commands (with the caching flag set to true) followed by the Invoice table (header) insert, which is automatically designed to pull in all cached InvoiceLine records and save immediately.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"FQSaveToCache") VALUES ('250000-933272656', 'Building permit 1', 1.00000, <br />1.00, '20000-999022286', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"FQSaveToCache") VALUES ('250000-933272656', 'Building permit 2', 2.00000, <br />2.00, '20000-999022286', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", <br />"FQSaveToCache") VALUES ('250000-933272656', 'Building permit 3', 3.00000, <br />3.00, '20000-999022286', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "Invoice" ("CustomerRefListID", "ARAccountRefListID", <br />"TxnDate", "RefNumber", "BillAddressAddr1", "BillAddressAddr2", <br />"BillAddressCity", "BillAddressState", "BillAddressPostalCode", <br />"BillAddressCountry", "IsPending", "TermsRefListID", "DueDate", "ShipDate", <br />"ItemSalesTaxRefListID", "Memo", "IsToBePrinted", <br />"CustomerSalesTaxCodeRefListID") VALUES ('470001-1071525403', <br />'40000-933270541', {d'2002-10-01'}, '1', 'Brad Lamb', '1921 Appleseed <br />Lane', 'Bayshore', 'CA', '94326', 'USA', 0, '10000-933272658', <br />{d'2002-10-31'}, {d'2002-10-01'}, '2E0000-93327265 6', 'Memo Test', 0, <br />'10000-999022286')</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Create Lines in Purchase Order Table </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of creating one line Purchase Order </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: the FQSaveToCache field is not specified (or can be set to <span style="color: #990033;">false</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", <br />"PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", <br />"PurchaseOrderLineQuantity", "PurchaseOrderLineRate", <br />"PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID") VALUES <br />('10000-933272655', '1', '250000-933272656', 'See Attached 1', 1.0, 1.0, <br />1.11, '580000-1071526281')</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of creating Multi-line Purchase Orders </span></h3>
<p><strong><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Example with header information in each line item insert </span></strong></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This example creates one PurchaseOrder with three lines. Note the FQSaveToCache field, set to TRUE except on the last line.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", <br />"PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", <br />"PurchaseOrderLineQuantity", "PurchaseOrderLineRate", <br />"PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", <br />"FQSaveToCache") VALUES ('10000-933272655', '1', '250000-933272656', 'See Attached 1', 1.0, 1.0, 1.11, '580000-1071526281', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", <br />"PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", <br />"PurchaseOrderLineQuantity", "PurchaseOrderLineRate", <br />"PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", <br />"FQSaveToCache") VALUES ('10000-933272655', '1', '250000-933272656', 'See Attached 2', 2.0, 2.0, 2.22, '580000-1071526281', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", <br />"PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", <br />"PurchaseOrderLineQuantity", "PurchaseOrderLineRate", <br />"PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", <br />"FQSaveToCache") VALUES ('10000-933272655', '1', '250000-933272656', 'See Attached 3', 3.0, 3.0, 3.33, '580000-1071526281', 0)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Example with header information in PurchaseOrder table insert</strong> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This example creates one Purchase Order with three lines. Note the FQSaveToCache field, set to True. Saving the Purchase Order header saves the lines with it.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", <br />"PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", <br />"PurchaseOrderLineRate", "PurchaseOrderLineAmount", <br />"PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES <br />('250000-933272656', 'See Attached 1', 1.0, 1.0, 1.11, '580000-1071526281', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", <br />"PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", <br />"PurchaseOrderLineRate", "PurchaseOrderLineAmount", <br />"PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES <br />('250000-933272656', 'See Attached 2', 2.0, 2.0, 2.22, '580000-1071526281', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", <br />"PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", <br />"PurchaseOrderLineRate", "PurchaseOrderLineAmount", <br />"PurchaseOrderLineCustomerRefListID", "FQSaveToCache") VALUES <br />('250000-933272656', 'See Attached 3', 3.0, 3.0, 3.33, '580000-1071526281', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrder" ("VendorRefListID", "RefNumber", "Memo", <br />"IsToBePrinted") VALUES ('10000-933272655', '1', 'Memo Test', 0)</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Create Lines in Journal Table </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of creating multiple lines in Journal </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This example creates one Journal Entry with two credit lines and two debit lines. Note the FQSaveToCache field, set to TRUE except on the last line. Also, when saving Journal Entries, QuickBooks will reject transaction which does not balance the Credit and Debit sides.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "JournalEntryCreditLine" ("RefNumber", <br />"JournalCreditLineAccountRefListID", "JournalCreditLineAmount", <br />"JournalCreditLineMemo", "FQSaveToCache") VALUES ('1', '120000-933270541', 1.11, 'Test Memo 1', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "JournalEntryCreditLine" ("RefNumber", <br />"JournalCreditLineAccountRefListID", "JournalCreditLineAmount", <br />"JournalCreditLineMemo", "FQSaveToCache") VALUES ('1', '120000-933270542', 2.22, 'Test Memo 2', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "JournalEntryDebitLine" ("RefNumber", <br />"JournalDebitLineAccountRefListID", "JournalDebitLineAmount", <br />"JournalDebitLineMemo", "FQSaveToCache") VALUES ('1', '120000-933270543', <br />1.11, 'Test Memo 1', 1)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "JournalEntryDebitLine" ("RefNumber", <br />"JournalDebitLineAccountRefListID", "JournalDebitLineAmount", <br />"JournalDebitLineMemo", "FQSaveToCache") VALUES ('1', '120000-933270544', <br />2.22, 'Test Memo 2', 0)</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">A VBScript Example for creating multiple lines </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you prefer to use VBScript instead of SQL commands, the following example may be helpful to you.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to execute the script </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Save the text below between the &lt;&lt;&gt;&gt; markers and save it as the filename "InvoiceAdd.vbs" then, you can click on the script while QuickBooks is running, and it will work. Similar code will be used inside Visual Basic language compilers.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">A VBScript Sample for creating multi-line Invoices </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&lt;&lt;&gt;&gt;<br />'This creates one invoice with three lines. <br />'Note the FQSaveToCache field, set to TRUE except on the last line.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Const adOpenStatic = 3<br />Const adLockOptimistic = 3<br />Const adUseClient = 3</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Dim oConnection<br />Dim oRecordset<br />Dim sLastVendor<br />Dim dTotalApplied<br />Dim dAmountDue</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Set oConnection = CreateObject("ADODB.Connection")<br />Set oRecordset = CreateObject("ADODB.Recordset")</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">oConnection.Open "DSN=Quickbooks Data;OLE DB Services=-2;"<br />oRecordset.CursorLocation = adUseClient<br />oRecordset.Open "SELECT * FROM InvoiceLine WHERE TxnId = 'X'" , <br />oConnection, adOpenStatic, adLockOptimistic</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">oRecordset.AddNew()<br />oRecordset.Fields("RefNumber").Value = "1"<br />oRecordset.Fields("CustomerRefListID").Value = "470001-1071525403"<br />oRecordset.Fields("InvoiceLineItemRefListID").Value = "250000-933272656"<br />oRecordset.Fields("InvoiceLineDesc").Value = "Building permit 1"<br />oRecordset.Fields("InvoiceLineRate").Value = 1<br />oRecordset.Fields("InvoiceLineAmount").Value = 1<br />oRecordset.Fields("InvoiceLineSalesTaxCodeRefListID").Value = "2 0000-999022286"<br />oRecordset.Fields("FQSaveToCache").Value = True<br />oRecordset.Update()</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">oRecordset.AddNew()<br />oRecordset.Fields("RefNumber").Value = "1"<br />oRecordset.Fields("CustomerRefListID").Value = "470001-1071525403"<br />oRecordset.Fields("InvoiceLineItemRefListID").Value = "250000-933272656"<br />oRecordset.Fields("InvoiceLineDesc").Value = "Building permit 2"<br />oRecordset.Fields("InvoiceLineRate").Value = 2<br />oRecordset.Fields("InvoiceLineAmount").Value = 2<br />oRecordset.Fields("InvoiceLineSalesTaxCodeRefListID").Value = "20000-999022286"<br />oRecordset.Fields("FQSaveToCache").Value = True<br />oRecordset.Update()</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">oRecordset.AddNew()<br />oRecordset.Fields("RefNumber").Value = "1"<br />oRecordset.Fields("CustomerRefListID").Value = "470001-1071525403"<br />oRecordset.Fields("InvoiceLineItemRefListID").Value = "250000-933272656"<br />oRecordset.Fields("InvoiceLineDesc").Value = "Building permit 3"<br />oRecordset.Fields("InvoiceLineRate").Value = 3<br />oRecordset.Fields("InvoiceLineAmount").Value = 3<br />oRecordset.Fields("InvoiceLineSalesTaxCodeRefListID").Value = "20000-999022286"<br />oRecordset.Fields("FQSaveToCache").Value = False<br />oRecordset.Update()</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">oRecordset.Close<br />oConnection.Close<br />&lt;&lt;&gt;&gt;</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to see Pending Uninvoiced Sales in the Sales Order Table using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2335]]></link>
<guid isPermaLink="false"><![CDATA[7b4773c039d539af17c883eb9283dd14]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Seeing Pending Uninvoiced Sales in the Sales Order Table
Query SalesOrder Table 
To do this, you can query the SalesOrder table using a where IsFullyInvoiced = False clause like below:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT TxnNumber, Cust...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Seeing Pending Uninvoiced Sales in the Sales Order Table</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Query SalesOrder Table </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">To do this, you can query the SalesOrder table using a <span style="color: #0000ff;">where IsFullyInvoiced = False</span> clause like below:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT TxnNumber, CustomerRefFullName, TxnDate, <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RefNumber, TotalAmount FROM SalesOrder <br /> <strong>&nbsp;&nbsp;&nbsp;&nbsp; </strong><span style="color: #0000ff;">where IsFullyInvoiced = FALSE</span> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Compare with Pending Sales Report </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sp_report PendingSales show <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TxnNumber, Name, Date, RefNumber, Amount parameters <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DateMacro = 'All' where RowType='DataRow' </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: The report result below should match this: </span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/pendingsales.JPG" alt="" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create a Sales Order using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2330]]></link>
<guid isPermaLink="false"><![CDATA[619205da514e83f869515c782a328d3c]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Creating a Sales Order
Note: This example creates one Sales Order with two order lines. Note how the FQSaveToCache field is set to True except on the last line.
First Line 
 INSERT INTO "SalesOrderLine" ("CustomerRefListID", "TemplateRefL...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Creating a Sales Order</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This example creates one Sales Order with two order lines. Note how the <span style="color: #ff0000;">FQSaveToCache</span> field is set to True except on the <span style="color: #ff0000;">last</span> line.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">First Line </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> INSERT INTO "SalesOrderLine" ("<span style="color: #0000ff;">CustomerRefListID</span>", "<span style="color: #006633;">TemplateRefListID</span>","RefNumber", "<span style="color: #990000;">SalesOrderLineItemRefListID</span>", "SalesOrderLineDesc", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; "SalesOrderLineQuantity", "SalesOrderLineRate", "SalesOrderLineAmount", "<span style="color: #6633cc;">SalesOrderLineSalesTaxCodeRefListID</span>","<span style="color: #ff0000;">FQSaveToCache</span>") VALUES&nbsp;&nbsp;&nbsp;&nbsp; (<span style="color: #000000;">'<span style="color: #0000ff;">120000-1045537156</span>'</span>,<span style="color: #006633;">'C0000-1080110273'</span><span style="color: #330000;">,'1015',</span> <span style="color: #000000;">'<span style="color: #990000;">90000-1045537150</span>'</span>, '4m Steel Ladder', 1.00000, 1.00000, 150.00, <span style="color: #000000;">'<span style="color: #6633cc;">90000-1045536338</span>'</span>, <span style="color: #ff0000;">1</span>)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Second (Last) Line </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "SalesOrderLine" ("<span style="color: #0000ff;">CustomerRefListID</span>", "<span style="color: #006633;">TemplateRefListID</span>","RefNumber", "<span style="color: #990000;">SalesOrderLineItemRefListID</span>", "SalesOrderLineDesc", "SalesOrderLineQuantity", "SalesOrderLineRate", "SalesOrderLineAmount", "<span style="color: #6633cc;">SalesOrderLineSalesTaxCodeRefListID</span>","<span style="color: #ff0000;">FQSaveToCache</span>") VALUES (<span style="color: #0000ff;">'120000-1045537156'</span>,<span style="color: #006633;">'C0000-1080110273'</span><span style="color: #330000;">,'1015',</span> <span style="color: #000000;">'<span style="color: #990000;">150001-1045625669</span>'</span>, 'Paint Brush:Big', 1.00000, 1.00000, 11.60, <span style="color: #003366;">'<span style="color: #6633cc;">90000-1045536338</span>'</span>, <span style="color: #ff0000;">0</span>)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Related Data Description</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0000ff;">CustomerRefListID</span> is the existing Customer ListID found by using the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: Arial, Helvetica, sans-serif;">Select * from Customer</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #006633;">TemplateRefListID</span> is the Sales Order Template ListID found by using:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Select * from Template</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #990000;">SalesOrderLineItemRefListID</span> is the existing Inventory Item ListIDs found by using:<br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp; Select ListID, FullName, Description, and Type from the Item</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Sample Data Description for SalesOrderLineItemRefListID </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; In my case, my Australian QuickBooks 2004 sample file returned the following items:</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/images/itemsm.JPG" alt="" width="600" height="232" border="0" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; In the Sales Order inserts above, I used the following Inventory Items: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; <strong>Description</strong>: </span><span style="font-family: Arial, Helvetica, sans-serif;">"4m Steel Ladder" <strong>&nbsp;&nbsp;&nbsp;&nbsp; ListID</strong><span style="color: #000000;">: '90000-1045537150' </span> (in Row 17 above)&nbsp;&nbsp; and<br /> &nbsp;&nbsp;&nbsp;&nbsp; <strong>Description</strong>: "Paint Brush:Big" <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ListID</strong>: <span style="color: #000000;">'150001-1045625669' </span>(in Row 25 above)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6633cc;">SalesOrderLineSalesTaxCodeRefListID</span> is the SalesTaxCode ListID found by using:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select * from SalesTaxCode</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Outside USA, SalesOrderLineSalesTaxCodeRefListID is SalesOrderLineTaxCodeRefListID instead to make as follows.<br /> <span style="color: #003366;"> SalesOrderLineTaxCodeRefListID</span> the TaxCode ListID found by using:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Select * from TaxCode</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] Foreign Currency and Exchange Rates]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2246]]></link>
<guid isPermaLink="false"><![CDATA[758a06618c69880a6cee5314ee42d52f]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Instructions for Foreign Currency 
&nbsp;&nbsp;&nbsp;&nbsp; Foreign currency is supported in versions of QuickBooks that support it. The stored procedure reports in QODBC "sp_report" shows the foreign currency type in the "Account" column. For example, i...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Instructions for Foreign Currency </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Foreign currency is supported in versions of QuickBooks that support it. The stored procedure reports in QODBC "sp_report" shows the foreign currency type in the "<strong>Account</strong>" column. For example, in this report :<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; sp_report CustomerBalanceDetail show Text, Blank, TxnType, Date, RefNumber, Account , Amount, RunningBalance parameters DateMacro = 'All' <br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; The "<strong>Account</strong>" column will show, for example, "Accounts Receivable" except for a customer that uses a foreign currency, in which case it will say for foreign currency account, for example, "Yen Account" (or whatever you have defined them in the account type in QuickBooks). </span></p>
<h2>&nbsp;</h2>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Seeing Exchange Rate in Foreign Currency Transaction </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instruction</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; This is not as simple as it sounds. For example, I can pay the Foreign Amount into my USD$ Bank Account or my Canadian $ Bank Account, and the Exchange Rate would not apply to the USD$ Bank Account but would apply to the Canadian $ Bank Account (boxed in red below)! </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Foreign currency comes into play when a customer pays you a Foreign Amount, or you pay a Foreign Amount. For example (here take accounts receivable and accounts payable as an example): </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">ACCOUNTS RECEIVABLE</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp; SELECT TxnID, ARAccountRefFullName, DepositToAccountRefFullName, <br />&nbsp;&nbsp;&nbsp; AppliedToTxnRefNumber, AppliedToTxnAmount, ExchangeRate <br />&nbsp;&nbsp;&nbsp; FROM ReceivePaymentLine <br />&nbsp;&nbsp;&nbsp; where CustomerRefFullName='FLEXquarters.com LLC'</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/currency1.JPG" alt="" width="633" height="398" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">ACCOUNTS PAYABLE</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT BillLinkedTxn.TxnID, BillLinkedTxn.APAccountRefFullName,<br />&nbsp;&nbsp;&nbsp;&nbsp; BillPaymentCheck.BankAccountRefFullName, BillLinkedTxn.RefNumber, <br />&nbsp;&nbsp;&nbsp;&nbsp; BillPaymentCheck.Amount, BillLinkedTxn.ExchangeRate <br />&nbsp;&nbsp;&nbsp;&nbsp; FROM BillLinkedTxn, BillPaymentCheck<br />&nbsp;&nbsp;&nbsp;&nbsp; where BillLinkedTxn.LinkedTxnTxnID = BillPaymentCheck.TxnID<br />&nbsp;&nbsp;&nbsp;&nbsp; and BillLinkedTxn.VendorRefFullName='Intuit'</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/currency2.JPG" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: A number of QODBC tables contain an ExchangeRate column when used with non-USA editions of QuickBooks.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See an example of how to create an invoice using exchange rates below.</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An example of Creating an Invoice Using Exchange Rates </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: When using Exchange Rates, you always need to use the same table for all inserts. In other words, the final insert should be InvoiceLine <span style="color: #ff0000;">without</span> the <span style="color: #ff0000;">FQSaveToCache</span> or with FQSaveToCache set to <span style="color: #ff0000;">false</span>. You cannot use both InvoiceLine and Invoice.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Query in QODBC </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; For example, this insert created an Invoice using the exchange rate of 1.4222 specified:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO InvoiceLine (CustomerRefListID, InvoiceLineItemRefListID, InvoiceLineDesc, <br />&nbsp;&nbsp;&nbsp;&nbsp; InvoiceLineQuantity, InvoiceLineRate, InvoiceLineClassRefListID, InvoiceLineAmount, <br />&nbsp;&nbsp;&nbsp;&nbsp; InvoiceLineTaxCodeRefListID, <span style="color: #ff0000;">ExchangeRate</span>, FQSaveToCache) <br />&nbsp;&nbsp;&nbsp;&nbsp; VALUES ('2E0000-1197674120','2B0000-1197674351', 'QODBC v7 Driver for QuickBooks 2007', <br />&nbsp;&nbsp;&nbsp;&nbsp; 1, 199, '30000-1045538607', 199, '70000-1045536338', <span style="color: #ff0000;">1.4222</span>, 0)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/exchangerateline1.JPG" alt="" /></span></p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks </span></h3>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/exchangerateline2.JPG" alt="" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Vendors (Suppliers) using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2205]]></link>
<guid isPermaLink="false"><![CDATA[06d5ae105ea1bea4d800bc96491876e9]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Creating a Vendor (Supplier)
Note: If you need to create a supplier, you can use a format similar to the one below. 
For USA Editions of QuickBooks
INSERT INTO Vendor (IsActive, Name, CompanyName, VendorAddressAddr1, VendorAddressAddr2, V...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Creating a Vendor (Supplier)</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: If you need to create a supplier, you can use a format similar to the one below. </span></p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">For USA Editions of QuickBooks</span></span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO <strong>Vendor</strong> (IsActive, Name, CompanyName, VendorAddressAddr1, VendorAddressAddr2, VendorAddressAddr3, VendorAddressCity, <span style="color: #0000ff;">VendorAddressState</span>, VendorAddressPostalCode, VendorAddressCountry, Phone, Fax, Email, AccountNumber, Notes) VALUES (1,'A-1 Sanitation Service','A-1 Sanitation Service','P.O. Box 9001706','','','Louisville','KY','40290-1706','','(910) 791-4048','','','176854','')</span></p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">For Non-USA Editions of QuickBooks</span></span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO <strong>Vendor</strong> (IsActive, Name, CompanyName, VendorAddressAddr1, VendorAddressAddr2, VendorAddressAddr3, VendorAddressCity, <span style="color: #0000ff;">VendorAddressCounty</span>, VendorAddressPostalCode, VendorAddressCountry, Phone, Fax, Email, AccountNumber, Notes) VALUES (1,'A-1 Sanitation Service','A-1 Sanitation Service','P.O. Box 9001706','','','Lysterfield','VIC','3155,'','(910) 791-4048','','','176854','')</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Special Notes </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>For Jobs</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong> &nbsp;&nbsp;&nbsp; </strong>For jobs, add <strong>ParentRefListID</strong> or <strong>ParentRefFullName</strong> of the Jobs parent record.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Unique Name </span></strong><br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; The name must be unique to the Customer, Employee, or Vendor, and another name is required for the insert. You can query the Entity to verify if a name already exists.</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2205/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <span style="color: #6633cc;">Problem and Solution </span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Problem Description</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; I have inserted a new vendor successfully. The customer shows in QuickBooks, but the customer record isn't there when I do a query in the QODBC Test Tool. What causes that to happen, and how do I fix it?</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solution</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; This occurs when your computer's time setting has been changed or when using a QuickBooks sample file. When this happens, you can resync your optimized vendor table by running the following:</span></p>
<p><span style="color: #0000ff; font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; sp_optimizefullsync</span><span style="font-family: Arial, Helvetica, sans-serif;"> vendor</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Or you can by-pass the optimized table by doing the:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select * from vendor <span style="color: #990000;">unoptimized</span></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How are dates formatted in SQL queries when using the QuickBooks generated timestamps]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2203]]></link>
<guid isPermaLink="false"><![CDATA[2d969e2cee8cfa07ce7ca0bb13c7a36d]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Date and TimeStamps Format Used for Normal 
Note: If you have any problems with the date format, use this format for direct SQL calls to our driver: {d'YYYY-MM-DD'} &nbsp;
For Example, {d &lsquo;2006-01-27&rsquo;}
Examples
Date Format
SELECT * from I...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Date and TimeStamps Format Used for Normal </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: If you have any problems with the date format, use this format for direct SQL calls to our driver: {d'YYYY-MM-DD'} &nbsp;</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">For Example, {d &lsquo;2006-01-27&rsquo;}</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Examples</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Date Format</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT * from InvoiceLine WHERE TxnDate &gt;= <span style="color: #0000ff;">{d '2005-09-23'}</span></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Time Stamps Format</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT * FROM Customer WHERE TimeCreated = <span style="color: #0000ff;">{ts '1999-07-29 14:24:18.000'}</span><br />SELECT * from InvoiceLine WHERE TimeModified &gt;= <span style="color: #0000ff;">{ts '2005-09-23 00:00:00.000'}</span></span>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Date and Time Stamps Format Used for Microsoft Access Queries </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Examples</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Date Format</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT * from InvoiceLine WHERE TxnDate &gt;= <span style="color: #0000ff;">#9/23/2005#</span></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Time Stamps Format</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT * FROM InvoiceLine WHERE Invoice.TimeModified &gt;= <span style="color: #0000ff;">#2003-09-23 00:00:01#</span><br /> <br /> <strong>Note</strong>: The Access format may vary based on the setting for your default date format for your region in your Windows control panel.</span>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Date and Time Stamps Conversion</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: <span style="color: #000000;">If you need to convert <span style="color: #0000ff;">a Timestamp to a Date</span>, or <span style="color: #990000;">a Date to a Timestamp</span>, use the following <strong>CONVERT</strong> function</span>.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Examples</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Date and TimeStamps Conversion for Now </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT <span style="color: #0000ff;">{fn CONVERT({ts '2005-09-23 00:00:00.000'}, SQL_TYPE_DATE)} as ToDate</span>, <br /> <span style="color: #990000;">{fn CONVERT(TxnDate, SQL_TIMESTAMP)} as ToTimeStamp</span>, RefNumber FROM Invoice</span>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Date and TimeStamps Used in Queries </span></h2>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Convert Date to the Past</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">To convert today's date to eight months ago, do the following. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">select {fn Curtime()}, TxnDate,SubTotal from Invoice NOSYNC<br />where TxnDate&gt; {d'2007-08-01'}<br />and TxnDate&gt; <span style="color: #0000ff;">{fn CONVERT( {fn TIMESTAMPADD(SQL_TSI_MONTH,-8, {fn CURDATE()} )}, SQL_DATE)}</span></span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Display Modified Records in a Period of Time </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This will display modified Sales Order lines from 15 minutes ago.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Select * from SalesOrderLine Calldirect where timemodified &gt;= <span style="color: #0000ff;">{fn TIMESTAMPADD(SQL_TSI_MINUTE, -15, {fn NOW()})}</span> </span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Display Today's Modified Records </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">While the below will display today's modified Sales Order Lines.<br /> <br />Select * from SalesOrderLine CallDirect where timemodified &gt;= <span style="color: #0000ff;">{fn CONVERT({fn Curdate()}, SQL_TIMESTAMP)}</span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>See</strong>&nbsp;<a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2343" target="_blank">QODBC Function List</a> for more about related Date functions.</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Keywords: ts, timestamp, time stamp, date format, time format</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to delete an Invoice Line in the InvoiceLine table using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2180]]></link>
<guid isPermaLink="false"><![CDATA[3a1dd98341fafc1dfe9bcf36360e6b84]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Deleting an InvoiceLine 
Create an Invoice with Three Lines 
First Line 
&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber",  &nbsp;&nbsp;&nbsp;&nbsp; "InvoiceLineItemRefListID", "InvoiceLineDesc", "Invoi...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;"><span id="4e4f1820-2fe5-4c0b-bc4d-b672137465b9" class="GINGER_SOFTWARE_mark">An</span> Example of Deleting an InvoiceLine </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create an Invoice with Three Lines </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLine" ("<span style="color: #0000ff;">CustomerRefListID</span>", "RefNumber", <br /> &nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #990000;">InvoiceLineItemRefListID</span>", "InvoiceLineDesc", "InvoiceLineRate", <br /> &nbsp;&nbsp;&nbsp;&nbsp; "<span id="956abe65-9ac5-4759-82e7-670172b94fd9" class="GINGER_SOFTWARE_mark">InvoiceLineAmount</span>", "<span style="color: #6633cc;">InvoiceLineSalesTaxCodeRefListID</span>", "<span style="color: #ff0000;">FQSaveToCache</span>") <br /> &nbsp;&nbsp;&nbsp;&nbsp; VALUES (<span style="color: #008080;">'<span style="color: #0000ff;">4C0000-1040154668</span>'</span>, 'QODBCNeg1', <span style="color: #800080;">'<span style="color: #990000;">670004-1044572237</span>'</span>, 'Building <span id="fcc6fe19-c764-4844-90a1-0eb7b2c2e562" class="GINGER_SOFTWARE_mark">permit</span> Additional Room', <br /> &nbsp;&nbsp;&nbsp;&nbsp; 100.00000, 100.00, <span style="color: #000080;">'<span style="color: #6633cc;">20000-1011136881</span>'</span>, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2180/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Second Line</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLine" ("<span style="color: #0000ff;">CustomerRefListID</span><span style="color: #008080;">", </span>"RefNumber", <br /> &nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #990000;">InvoiceLineItemRefListID</span>", "InvoiceLineDesc", "InvoiceLineRate", <br /> &nbsp;&nbsp;&nbsp;&nbsp; "<span id="1c596488-b875-4612-a335-186ed0daabd1" class="GINGER_SOFTWARE_mark">InvoiceLineAmount</span>", "<span style="color: #6633cc;">InvoiceLineSalesTaxCodeRefListID</span>", "<span style="color: #ff0000;">FQSaveToCache</span>") <br /> &nbsp;&nbsp;&nbsp;&nbsp; VALUES (<span style="color: #008080;">'<span style="color: #0000ff;">4C0000-1040154668</span>'</span>, 'QODBCNeg1', <span style="color: #800080;">'<span style="color: #990000;">700003-1197741298</span>'</span>, 'Bin Permit Renovations', <br /> &nbsp;&nbsp;&nbsp;&nbsp; 200.00000, 200.00, <span style="color: #000080;">'<span style="color: #6633cc;">20000-1011136881</span>'</span>, <span style="color: #ff0000;">1</span>)</span></p>
<div>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2180/Q2.png" alt="" /> </span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third (Last) Line </strong></span></p>
</div>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLine" ("<span style="color: #0000ff;">CustomerRefListID</span><span style="color: #008080;">",</span></span> <span style="font-family: Arial, Helvetica, sans-serif;">"RefNumber", <br /> &nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #990000;">InvoiceLineItemRefListID</span>", "InvoiceLineDesc", "InvoiceLineRate", <br /> &nbsp;&nbsp;&nbsp;&nbsp; "<span id="afa2bc44-5bfe-480f-acd1-b498cd07113e" class="GINGER_SOFTWARE_mark">InvoiceLineAmount</span>", "<span style="color: #6633cc;">InvoiceLineSalesTaxCodeRefListID</span>", "<span style="color: #ff0000;">FQSaveToCache</span>") <br /> &nbsp;&nbsp;&nbsp;&nbsp; VALUES (<span style="color: #008080;">'<span style="color: #0000ff;">4C0000-1040154668</span>'</span>, 'QODBCNeg1', <span style="color: #800080;">'<span style="color: #990000;">80000092-1481798847</span>'</span>, 'Less Council Rebate', <br /> <span style="color: #800000;">&nbsp;&nbsp;&nbsp;&nbsp; -50.00000</span>, <span style="color: #800000;">-50.00</span>, <span style="color: #000080;">'<span style="color: #6633cc;">20000-1011136881</span>'</span>, <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2180/Q3.png" alt="" /></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">The result is Displayed in QuickBooks.</span></h3>
<p>&nbsp;&nbsp;&nbsp;&nbsp; Once these three SQL INSERT commands have been run in sequence (without breaking the QODBC connection), QODBC will generate the next invoice in the Sample company file in the USA edition of QuickBooks 2022.</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: See Line 3 of the invoice below for a line item discount of <span style="color: #0000ff;">$50.00</span> :</span></p>
<p><img src="https://support.flexquarters.com/esupport/newimages/2180/Q4.png" alt="" /></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Locate the TxnID and InvoiceLineTxnLineID </span></h3>
<p>&nbsp;&nbsp;&nbsp;&nbsp; To locate the <strong>TxnID</strong> and <strong>InvoiceLineTxnLineID</strong> for the new invoice lines, we run the following query using QODBC Test Tool:</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT TxnID, InvoiceLineTxnLineID, InvoiceLineDesc, InvoiceLineAmount, <br /> &nbsp;&nbsp;&nbsp;&nbsp; RefNumber FROM InvoiceLine <span style="color: #ff0000;">unoptimized</span> where RefNumber = 'QODBCNeg1'</span></p>
<p><img src="https://support.flexquarters.com/esupport/newimages/2180/Q5.png" alt="" /></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Delete the Last Line in InvoiceLine Table </span></h3>
<p>&nbsp;&nbsp;&nbsp;&nbsp; To delete the last line, we run the following query using the <strong>TxnID</strong> and <strong>InvoiceLIneTxnLineID</strong> values for the last invoice line in QODBC Test Tool:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; delete from InvoiceLine where TxnID='5BAB-1197758658' <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and InvoiceLineTxnLineID='5BAF-1197758658'</p>
<p><img src="https://support.flexquarters.com/esupport/newimages/2180/Q6.png" alt="" /></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">The result Displayed in QODBC </span></strong></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; The last invoice line is now deleted, and it can be verified by re-running:</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT TxnID, InvoiceLineTxnLineID, InvoiceLineDesc, InvoiceLineAmount, <br /> &nbsp;&nbsp;&nbsp;&nbsp; RefNumber FROM InvoiceLine <span style="color: #ff0000;">unoptimized</span> where RefNumber = 'QODBCNeg1'</span></p>
<p><img src="https://support.flexquarters.com/esupport/newimages/2180/Q7.png" alt="" /></p>
<p><strong>Note</strong>: All regions outside the United States should use <strong>TaxCode</strong> instead of <strong>SalesTaxCode</strong>.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to change the Income Account for a Stock Item that has already been invoiced]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2179]]></link>
<guid isPermaLink="false"><![CDATA[12b1e42dc0746f22cf361267de07073f]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of a Change in the Income Account for a Stock item that has been Invoiced 
Create an Invoice for a Stock
&nbsp;&nbsp;&nbsp;&nbsp; Here we create an invoice for a stock part called 'Door Frame':
&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLi...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of a Change in the Income Account for a Stock item that has been Invoiced </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create an Invoice for a Stock</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Here we create an invoice for a stock part called <span style="color: #000000;">'<span style="color: #0000ff;">Door Frame</span>':</span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLine" ("CustomerRefFullName", "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #0000ff;">InvoiceLineItemRefFullName</span>", "InvoiceLineDesc", "InvoiceLineQuantity", <br />&nbsp;&nbsp;&nbsp;&nbsp; "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefFullName", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Richman, Karen-2273526', '1001', <br /> <span style="color: #800000;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #000000;">'<span style="color: #0000ff;">Door Frame</span>'</span></span>, 'standard interior door frame', 3.00000, <br />&nbsp;&nbsp;&nbsp;&nbsp; 150, 450.00, 'Non', <span style="color: #ff0000;">0</span>) </span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/incomeaccount1.JPG" alt="" width="633" height="398" /></span></p>
<p align="center">&nbsp;</p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Retrieve the TxnID for the transaction just Created </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To retrieve the <strong>TxnID</strong> for the transaction I just created, I use the QODBC stored procedure:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SP_LASTINSERTID InvoiceLine</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/incomeaccount2.JPG" alt="" width="633" height="398" /></span></p>
<p align="left">&nbsp;</p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Retrieve the TxnLineID from the Invoice Line </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; I can then retrieve the <strong>TxnLineID</strong> for the invoice line using the TnxID: '5DE5-1197763322':</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; select TxnID, InvoiceLineTxnLineID, InvoiceLineSeqNo from InvoiceLine <br />&nbsp;&nbsp;&nbsp;&nbsp; where TxnID='5DE5-1197763322'</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/incomeaccount3.JPG" alt="" width="633" height="398" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The <strong>TnxID</strong> and <strong>TxnLineID</strong> for the Invoice line I just created are: 5DE5-1197763322 and 5DE7-1197763322</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>The result is Displayed in QuickBooks.</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; In QuickBooks, a brief report for the invoice I just created shows the income account to be: <strong><span style="color: #000000;">Construction: Materials.</span></strong></span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/incomeaccount4.JPG" alt="" width="681" height="495" /></span></p>
<p align="left">&nbsp;</p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Change the Income Account</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Using the <strong>TnxID</strong> and <strong>TxnLineID</strong> for the Invoice line I just created, I can change the income account to a new Income Account by using the following UPDATE statement:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UPDATE InvoiceLine<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET InvoiceLineOverrideItemAccountRefFullName = 'New Income Account'<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE <span style="color: #0000ff;">TxnID</span> = '<span style="color: #0000ff;">5DE5-1197763322</span>' AND <span style="color: #6633cc;">InvoiceLineTxnLineID</span> = '<span style="color: #6633cc;">5DE7-1197763322</span>'</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/incomeaccount5.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>The result is Displayed in QuickBooks.</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; When I refresh the Quick Report in QuickBooks, it now shows the Income Account as&nbsp;<span style="color: #000000;"><strong>New Income Account</strong></span></span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/incomeaccount6.JPG" alt="" width="680" height="496" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Item Groups using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2172]]></link>
<guid isPermaLink="false"><![CDATA[9978b7063e297d84bb2ac8e46c1c845f]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Examples of Creating Item Groups 
 Create One ItemGroup with No Lines
INSERT INTO "ItemGroup" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup") VALUES ('TestWOLines', 1, 'Test Item Desc', 1)
Create One ItemGroup with Three Lines 
Note: This crea...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Examples of Creating Item Groups </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;"> Create One ItemGroup with No Lines</span></h3>
<p>INSERT INTO "<strong>ItemGroup</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup") VALUES ('TestWOLines', 1, 'Test Item Desc', 1)</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One ItemGroup with Three Lines </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates one ItemGroup with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to True except on the <span style="color: #ff0000;">last</span> one.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 1', 1, 'Test Item Desc', 1, '390000-1071512145', 1.0, <span style="color: #ff0000;">1</span>)</span></p>
<p align="center"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/itemgroup1.JPG" alt="" width="564" height="398" /></p>
<p align="left"><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Second Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 2', 1, 'Test Item Desc', 1, '320000-1071525597', 2.0, <span style="color: #ff0000;">1</span>)</span></p>
<p align="center"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/itemgroup2.JPG" alt="" width="564" height="398" /></p>
<p align="left"><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Third (Last) Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 3', 1, 'Test Item Desc', 1, '10000-933272655', 3.0, <span style="color: #ff0000;">0</span>)</span></p>
<p align="center"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/itemgroup3.JPG" alt="" width="564" height="398" /></p>
<p align="left"><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Result in QuickBooks </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The result looks like this in QuickBooks 2006:</span></p>
<p align="center"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/itemgroup4.JPG" alt="" width="517" height="391" /></p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One ItemGroup with Three Lines with Shared Header Information</span></h3>
<p align="left"><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates one ItemGroup with three lines. Saving the ItemGroup saves the lines with it. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span style="color: #ff0000;">True</span>.</span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('390000-1071512145', 1.0, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('320000-1071525597', 2.0, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('10000-933272655', 3.0, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Shared Header Information </strong></span></p>
<p>INSERT INTO "<strong>ItemGroup</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup") VALUES ('Test2 W3 Lines', 1, 'Test Item Desc', 1)</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See also: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/504" target="_blank">How to Invoice ItemGroups</a>.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to do an Inner JOIN in QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2144]]></link>
<guid isPermaLink="false"><![CDATA[7dc1c7653ac42a05642a667959c12239]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Inner JOINs and Left JOINs in QODBC
Note: Inner Joins, and Left Joins can be done with the following syntax (for a right join, reverse the table order and use a left join).
Examples
SELECT * FROM {OJ Invoice INNER JOIN Customer ON (Invoice.CustomerRefL...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">Inner JOINs and Left JOINs in QODBC</span></h2>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: Inner Joins, and Left Joins can be done with the following syntax (for a right join, reverse the table order and use a left join).</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Examples</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT * FROM {OJ Invoice INNER JOIN Customer ON (Invoice.CustomerRefListID = Customer.ListID)}<br /> <br />or<br /> <br />SELECT *FROM Invoice INNER JOIN Customer ON Invoice.CustomerRefListID = Customer.ListID</span></p>
<p><strong><span style="font-family: Arial,Helvetica,sans-serif;">Left Join</span></strong></p>
<p>SELECT&nbsp; Invoice.CustomerRefListID, Customer.fullname,Customer.listid&nbsp; FROM Customer Left outer JOIN Invoice ON Invoice.CustomerRefListID = Customer.ListID</p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Other Hints </span></h3>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Performance Related </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: Arial,Helvetica,sans-serif;">If you can include a starting value or range of values (&gt; and &lt;) for TxnDate or TimeModified as the first option in your WHERE statement, you can improve your performance many times over. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Also, there is a pretty big-time penalty for using <strong><span style="color: #000000;">ORDER BY. If</span></strong>&nbsp;you can live without it, you can improve your performance. It is also faster to specify only the fields you require than a wildcard.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Parentheses Required</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong> &nbsp;&nbsp;&nbsp; </strong>Parentheses are required when more than two tables are being joined:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">SELECT COUNT(TxnID) FROM <span style="color: #ff0000;">(</span>Invoice INNER JOIN SalesRep ON Invoice.SalesRepRefListID = SalesRep.ListID<span style="color: #ff0000;">)<br /> </span>INNER JOIN Employee ON SalesRep.SalesRepEntityRefListID = Employee.ListID</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to use InvoiceLinkedTxn query using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2130]]></link>
<guid isPermaLink="false"><![CDATA[f15d337c70078947cfe1b5d6f0ed3f13]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Examples of using InvoiceLinkedTxn query in QODBC 
Instruction of table InvoiceLinkedTxn 
&nbsp;&nbsp;&nbsp;&nbsp; Basically, the InvoiceLinkedTxn tables show Payments, Credit Memos, and Deposit Line Items but don't include reimbursements, transfers fro...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Examples of using InvoiceLinkedTxn query in QODBC </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instruction of table InvoiceLinkedTxn </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Basically, the <span style="color: #000000;">InvoiceLinkedTxn</span> tables show Payments, Credit Memos, and Deposit Line Items but don't include reimbursements, transfers from Sales Orders, or Estimates (depending on your QuickBooks version). </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">In QuickBooks </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; In QuickBooks, you probably understand it better as the History for an Invoice, for example, as below:</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/linkedtxn1.JPG" alt="" /></span></p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">In QODBC </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; If I run the following query for <span style="color: #0000ff;">Invoice Number 51</span>:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT LinkedTxnTxnType as Type, LinkedTxnTxnDate as Date,<br />&nbsp;&nbsp;&nbsp;&nbsp; LinkedTxnRefNumber as Number, LinkedTxnAmount as Amount, <br />&nbsp;&nbsp;&nbsp;&nbsp; BalanceRemaining as Balance <span style="color: #800000;">FROM InvoiceLinkedTxn</span></span> <span style="font-family: Arial, Helvetica, sans-serif;"><br />&nbsp;&nbsp;&nbsp;&nbsp; where RefNumber='51'</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/linkedtxn2.JPG" alt="" width="633" height="398" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; You will see the Transaction History for Invoice #51 using QODBC too!</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>LinkedTxnTxnType and LinkedTxnTxnID</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; In the <span style="color: #000000;">InvoiceLinkedTxn</span> table, The TxnID is the same TxnID as the Invoice. The <span style="color: #0000ff;">LinkedTxnTxnType</span> tells you what the line is linked to, which can be any one of the following: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Bill, BillPaymentCheck, BillPaymentCreditCard, BuildAssembly, Charge, Check, CreditCardCharge, CreditCardCredit, CreditMemo, Deposit, Estimate, InventoryAdjustment, Invoice, ItemReceipt, JournalEntry, LiabilityAdjustment, Paycheck, PayrollLiabilityCheck, PurchaseOrder, ReceivePayment, SalesOrder, SalesReceipt, SalesTaxPaymentCheck, Transfer, VendorCredit, YTDAdjustment, or ARRefundCreditCard </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">and the <span style="color: #0000ff;">LinkedTxnTxnID</span> is the TxnID of the record it is linked to. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; The InvoiceLinkedTxn table is read-only. So you have to insert a ReceivePaymentLine record that points to the Invoice.TxnID and then display the <span style="color: #000000;">InvoiceLinkedTxn</span> table, and you will see the record inserted as a line with a <span style="color: #0000ff;">LinkedTxnTxnType</span> of ReceivePayment and the <span style="color: #0000ff;">TxnID</span> of the ReceivePayment.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; For example, here you can see two payments against the one invoice:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT TxnID, LinkedTxnTxnType, LinkedTxnTxnID, LinkedTxnTxnDate as Date,<br />&nbsp;&nbsp;&nbsp;&nbsp; LinkedTxnRefNumber as Number, LinkedTxnAmount as Amount, <br />&nbsp;&nbsp;&nbsp;&nbsp; BalanceRemaining as Balance from InvoiceLinkedTxn</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/InvoiceLinkedTxn1.JPG" alt="" /></span></p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></h2>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Examples of Single Query with InvoiceLinkedTxn Table </span></h2>
<p>&nbsp;&nbsp;&nbsp;&nbsp; <strong>Note</strong>: The quickest way to do anything using QODBC is to run a single query (and in the case of MS Access - run the query as a pass-through query).</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">A Simple Query with Optimizer for Maximum Speed</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; This query will extract information from the Invoice and InvoiceLinkedTxn tables using the QODBC optimizer (by use of the <span style="color: #0000ff;">NOSYNC </span>tag) for maximum speed:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT Invoice.CustomerRefFullName, Invoice.RefNumber, InvoiceLinkedTxn.TxnID,<br />&nbsp;&nbsp;&nbsp;&nbsp; InvoiceLinkedTxn.LinkedTxnTxnType, InvoiceLinkedTxn.LinkedTxnTxnID, <br />&nbsp;&nbsp;&nbsp;&nbsp; InvoiceLinkedTxn.LinkedTxnTxnDate as Date, InvoiceLinkedTxn.LinkedTxnRefNumber as Number,<br />&nbsp;&nbsp;&nbsp;&nbsp; InvoiceLinkedTxn.LinkedTxnAmount as Amount, InvoiceLinkedTxn.BalanceRemaining as Balance<br />&nbsp;&nbsp;&nbsp;&nbsp; from Invoice <span style="color: #0000ff;">NOSYNC</span>, InvoiceLinkedTxn <span style="color: #0000ff;">NOSYNC</span><br />&nbsp;&nbsp;&nbsp;&nbsp; where Invoice.TxnID=InvoiceLinkedTxn.TxnID<br />&nbsp;&nbsp;&nbsp;&nbsp; and Invoice.TxnDate &gt;= {d'2007-01-01'} <br />&nbsp;&nbsp;&nbsp;&nbsp; order by Invoice.CustomerRefFullName</span></p>
<p align="center"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/InvoiceLinkedTnx.JPG" alt="" /></p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">A Simple Query with Optimized Tables ReSync</span></h3>
<p>&nbsp;&nbsp;&nbsp;&nbsp; If you don't see recent information, you can resync the optimized tables by running:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; sp_optimizeupdatesync Invoice</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; sp_optimizeupdatesync InvoiceLinkedTxn</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to write Deposits using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2115]]></link>
<guid isPermaLink="false"><![CDATA[bdc4626aa1d1df8e14d80d345b2a442d]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Two Examples of Writing Deposits 
Instructions
Note: Deposit inserts are done only to the DepositLine table. The Deposit table is a header table that cannot be inserted without cached DepositLine transactions.
Troubleshooting Note 
 &nbsp;&nbsp;&nbsp;...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Two Examples of Writing Deposits </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Deposit inserts are <span id="196759d3-4001-498f-9f05-3cd7923f9d9b" class="GINGER_SOFTWARE_mark">done</span> only to the <strong><span style="color: #000000;"><span id="f0b45182-4f18-4dca-8b0c-e1a824c58432" class="GINGER_SOFTWARE_mark">DepositLine</span></span></strong> table. <span id="fe0ac026-3970-41ab-aa3e-57c9590b0091" class="GINGER_SOFTWARE_mark">The Deposit</span> table is a header table that cannot be inserted without cached DepositLine transactions.</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;"><span id="506a974f-4b84-44ca-9f6b-42753d92d063" class="GINGER_SOFTWARE_mark">Troubleshooting</span> Note </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; If you <span id="aacc7887-580c-4e38-acd6-250e8aa3167e" class="GINGER_SOFTWARE_mark">encounter</span> the error below: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; [QODBC] Error:<span id="c785c4cf-91f4-437f-a5ba-de55a560b5ea" class="GINGER_SOFTWARE_mark"></span> 3180 &ndash; There was an error when saving a deposit line. <span id="beb9379d-9bb5-4592-a695-5bb7b7ac2bde" class="GINGER_SOFTWARE_mark">QuickBooks</span> error message:<span id="2fdbbbde-b1a0-4b7b-ab18-562bdabed1a5" class="GINGER_SOFTWARE_mark"></span> <span style="color: #000000;">The Payment has been changed</span>. (#10053). </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Switch your company file to Single User Mode. This is a "confirmed by Intuit" bug in QuickBooks 2004 through 2006 and only occurs when you try to do a deposit with the company file in multi-user mode.<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; Below are two examples.</span></p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">DEPOSIT FROM RECEIVE PAYMENTS MADE TO UNDEPOSITED FUNDS</span></span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Locate the Payment TxnID</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The first step is to locate the payment <span style="color: #0000ff;">TxnID</span> made to undeposited funds. To do this, you run the following query in QODBC Test Tool:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT <span style="color: #0000ff;">TxnID</span>, CustomerRefFullName, RefNumber, Amount FROM ReceivePaymentToDeposit</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2115/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Confirm the Exact Name of the Bank Account </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The second step is to confirm the exact name of the <span style="color: #990000;">Bank Account</span> you want to deposit the payment. To do this, you run the following query in QODBC Test Tool:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT ListID, <span style="color: #990000;">Name</span> FROM Account where Name = <span style="color: #000000;">'<span style="color: #990000;">Company Savings Account</span>'</span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2115/Q2.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Receive payment made to Undeposited Funds </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; You're ready to receive the payment made to undeposited funds using the <span style="color: #0000ff;">TxnID</span> and <span style="color: #800000;">Bank Account Name</span> found above. To do this, you run the following query in QODBC Test Tool:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO DepositLine (DepositLinePaymentTxnID, DepositToAccountRefFullName,TxnDate,FQSaveToCache) <br />&nbsp;&nbsp;&nbsp; Values (<span style="color: #000000;">'<span style="color: #0000ff;">8BFF-1481801824</span>','<span style="color: #990000;">Company Savings Account</span>'</span>,{d'2021-12-20'},0)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2115/Q3.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; You will receive the "Executed Successfully" message if your above input details are correct.</span></p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">DEPOSIT MADE DIRECTLY FROM THE DEPOSIT WINDOW</span></span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC Test Tool&nbsp;</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO <span style="color: #0000ff;">DepositLine </span>(DepositLineAccountRefFullName,DepositLineAmount,DepositLineCheckNumber,<br />&nbsp;&nbsp;&nbsp;&nbsp; DepositLineEntityRefFullName,DepositLineMemo,DepositLinePaymentMethodRefFullName,<br />&nbsp;&nbsp;&nbsp;&nbsp; DepositToAccountRefFullName,Memo,TxnDate,<span style="color: #ff0000;">FQSaveToCache</span>)<br />&nbsp;&nbsp;&nbsp;&nbsp; Values ('Interest Income',2000,'PANDA4567','2V:Panda Industries','Panda<br />&nbsp;&nbsp;&nbsp;&nbsp; memo','Check','BankNorth','Deposit',{d'2021-02-17'},<span style="color: #ff0000;">0</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Table Schema Rules for DepositLine </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Use the columns stored procedure in QODBC Test Tool to get the EXACT table schema rules for the QuickBooks Company file you have open. The last few columns have Queryable, Updateable, Insertable, and Required_On_Insert i.e.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6600cc;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #000000;">sp_columns</span></span> <span style="color: #0000ff;">DepositLine</span></span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">FQSaveToCache</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Multi-line inserts require a series of SQL statements to complete a single deposit. The key to this process is the field named "<span style="color: #ff0000;">FQSaveToCache</span>". This field is not part of the table but is used as a flag to the QODBC driver to cache the inserts until you're ready to commit all the inserts. The value of "<span style="color: #ff0000;">FQSaveToCache</span>" is set to <span style="color: #ff0000;">1</span> or <span style="color: #ff0000;">TRUE</span> for the insert SQL statements for the first lines in the deposit, and then it is set to <span style="color: #ff0000;">0</span> or <span style="color: #ff0000;">FALSE</span> for the <strong>final</strong> SQL statement, the last line of your multi-line deposit.<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; The 0 or False "FQSaveToCache" value tells QODBC to write all the SQL inserts as multiple lines for the one deposit (header row record).</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">DEPOSIT CASH FROM AN EXTERNAL POS SYSTEM</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Locate List IDs </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; To deposit cash, you must locate the List IDs for your posting. For example:</span></p>
<p><span style="color: #800000; font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; 3C0000-1106175506</span><span style="font-family: Arial, Helvetica, sans-serif;"> is GL Bank Account List ID<br /> <span style="color: #003366;">&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;">3E0000-1130003331</span></span> is AR Account List ID</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Insert Statement</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "DepositLine" ("TxnDate", "<span style="color: #800000;">DepositToAccountRefListID</span>", "Memo", "<span style="color: #0000ff;">DepositLineAccountRefListID</span>", "DepositLineAmount") VALUES ({d'2021-10-27'}, <span style="color: #800000;">'3C0000-1106175506'</span>, 'POS Cash Deposit', <span style="color: #000000;">'<span style="color: #0000ff;">3E0000-1130003331</span></span><span style="color: #003366;">'</span>, 5.50)<br /> <br /> <strong>Note</strong>: Never use DepositTotal, always use DepositLineAmount.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Keywords:&nbsp;accountlistid,&nbsp;accountname missing stored procedure, Receive,&nbsp;how to fix things after you dd an error on your reference while depositing,&nbsp;how to deposit a payment without an invoice</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Credit Memos]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2068]]></link>
<guid isPermaLink="false"><![CDATA[814a9c18f5abff398787c9cfcbf3d80c]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of creating Credit Memos 
Create One CreditMemo with Three Lines 
Note: This creates one CreditMemo with three lines. Note the FQSaveToCache field, set to True except on the last one. 
Note: The primary rule is first to save the data to the ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">An Example of creating Credit Memos </span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create One CreditMemo with Three Lines </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates one CreditMemo with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to True except on the <span style="color: #ff0000;">last</span> one. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note: </strong>The primary rule is first to save the data to the child record. The child record for each parent/child pair has all the data required by the parent record.<br />&nbsp; Please do not close the connection between the Insert of Child / Header &amp; sp_lastinsertID; otherwise, you will not be able to get the last inserted ID.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "Memo", "CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('180000-933272658', '40000-933270541', {d'2003-12-15'}, '1', 'Test Memo 1', '1E0000-933272656', 'Test Desc 1', 1.0, 11.1, <span style="color: #ff0000;">1</span>)</span></p>
<p><strong><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;">Second Line </span></strong></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "Memo", "CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('180000-933272658', '40000-933270541', {d'2003-12-15'}, '1', 'Test Memo 2', '1E0000-933272656', 'Test Desc 2', 2.0, 22.2, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Third (Last) Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "Memo", "CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('180000-933272658', '40000-933270541', {d'2003-12-15'}, '1', 'Test Memo 3', '1E0000-933272656', 'Test Desc 3', 3.0, 33.3, <span style="color: #ff0000;">0</span>)</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create One CreditMemo with Three Lines with All Shared Header Information </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates one CreditMemo with three lines. Saving the CreditMemo saves the lines with it. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span style="color: #ff0000;">True</span>.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('1E0000-933272656', 'Test Desc 1', 1.0, 11.1, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('1E0000-933272656', 'Test Desc 2', 2.0, 22.2, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('1E0000-933272656', 'Test Desc 3', 3.0, 33.3, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial,Helvetica,sans-serif;">Shared Header Information </span></strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemo" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "Memo") VALUES ('180000-933272658', '40000-933270541', {d'2003-12-15'}, '1', 'Test Memo')</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create Three CreditMemo with One Line Each </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates three CreditMemo with one line each. Note the <span style="color: #ff0000;">FQSaveToCache</span> field is <span style="color: #000000;"><strong>not</strong></span> specified (or can be set to <span style="color: #ff0000;">false</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First CreditMemo </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "Memo", "CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate") VALUES ('180000-933272658', '40000-933270541', {d'2003-12-15'}, '1', 'Test Memo 1', '1E0000-933272656', 'Test Desc 1', 1.0, 11.1)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Second CreditMemo</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "Memo", "CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate") VALUES ('180000-933272658', '40000-933270541', {d'2003-12-15'}, '1', 'Test Memo 2', '1E0000-933272656', 'Test Desc 2', 2.0, 22.2)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Third CreditMemo</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "CreditMemoLine" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "Memo", "CreditMemoLineItemRefListID", "CreditMemoLineDesc", "CreditMemoLineQuantity", "CreditMemoLineRate") VALUES ('180000-933272658', '40000-933270541', {d'2003-12-15'}, '1', 'Test Memo 3', '1E0000-933272656', 'Test Desc 3', 3.0, 33.3)</span></p>
<h3>&nbsp;</h3>
<p>&nbsp;</p>
<p>To apply a Credit memo to an existing Invoice, please refer to&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/359" target="_blank">TO APPLY THE PAYMENT TO THE INVOICE OR APPLY A CREDIT MEMO TO THE INVOICE</a></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Import Bill with Expense line and Item line using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2067]]></link>
<guid isPermaLink="false"><![CDATA[b5f1e8fb36cd7fbeb7988e8639ac79e9]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Importing a Bill with Item Line and Expense Line 
Note: It's simple, but you must create either the Expense or Item lines first and then add the Item or Expense lines afterward, like below. 
Note: The primary rule is first to save the data...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">An Example of Importing a Bill with Item Line and Expense Line </span></h2>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: It's simple, but you must create either the Expense or Item lines first and then add the Item or Expense lines afterward, like below. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note:</strong> The primary rule is first to save the data to the child record. The child record for each parent/child pair includes all the data required by the parent record.<br />You cannot insert into the Bill table without inserting the child table(s) like BillExpenseLine / BillItemLine.</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create the Expense Line</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>BillExpenseLine</strong>" ("ExpenseLineAccountRefListID", "ExpenseLineAmount", <br />"ExpenseLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") <br />VALUES ('370001-909762877', 436.07, <br />'Expense Line Memo Test,' <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2067/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Write the Bill Header</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>Bill</strong>" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", <br />"TermsRefListID", "DueDate", "Memo") <br />VALUES ('390000-1039739488', 'C0000-896817249', {d'2021-12-01'}, '905', <br />'50000-898307888', {d'2021-12-31'}, 'Test Expense and Item Lines')</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2067/Q2.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Determine the TxnID of the new Bill</span></h3>
<p><span style="color: #0000ff; font-family: Arial,Helvetica,sans-serif;">sp_lastinsertID</span><span style="font-family: Arial,Helvetica,sans-serif;"> <strong>Bill</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note: </strong>Please do not close the connection between the Insert Bill / BillExpenseLine / BillItemLine otherwise, you will not be able to get the last inserted ID.<strong>&nbsp;</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2067/Q3.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Use the TxnID to append Item lines to the existing Bill</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: The LastInsertID returned was: <span style="color: #0000ff;">8C47-1481796786</span></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("TxnID", "ItemLineItemRefListID", <br />"ItemLineDesc", "ItemLineCost", "ItemLineAmount") <br />VALUES ('8C47-1481796786', '8C0003-1044564690', <br />'Building permit 1', 1.00000, 1.00)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2067/Q4.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This results in the following Bill in QuickBooks with both an Expense and Item line:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2067/Q5.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><br /> <img src="https://support.flexquarters.com/esupport/newimages/2067/Q6.png" alt="" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Estimates using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2061]]></link>
<guid isPermaLink="false"><![CDATA[52dbb0686f8bd0c0c757acf716e28ec0]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Creating Estimates for USA QuickBooks Users
Note: This creates an Estimate with Three Lines with all shared header information. Note the FQSaveToCache field, set to True except on the last line.
Note: The primary rule is first to save the ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">An Example of Creating Estimates for USA QuickBooks Users</span></h2>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates an Estimate with Three Lines with all shared header information. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span id="e24d7c90-8791-4d8c-b065-4c5e6861415e" class="GINGER_SOFTWARE_mark">True except</span> <span id="0ba9e93f-f554-4464-b76b-615626f9ce79" class="GINGER_SOFTWARE_mark">on</span> the <span style="color: #ff0000;">last</span> line.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note: </strong>The primary rule is first to save the data to the child record. The child record for each parent/child pair includes all the data required by the parent record.<br />You cannot insert into the Estimate table without inserting the child table(s) like <span style="font-family: Arial,Helvetica,sans-serif;"><span id="85286f45-442d-480b-b82e-0ce5b8174cd2" class="GINGER_SOFTWARE_mark">EstimateLine</span></span>. Please do not close the connection between the Insert <span style="font-family: Arial,Helvetica,sans-serif;"><span id="dbfbd1fd-b527-4abc-8541-0744d09a2131" class="GINGER_SOFTWARE_mark">EstimateLine</span> </span>&amp; <span style="font-family: Arial,Helvetica,sans-serif;">Estimate;&nbsp;</span>otherwise, you will not be able to get the last inserted ID.</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">First Line </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "<strong><span id="2b9e9614-596a-44c8-85f5-74b3afb3b7f5" class="GINGER_SOFTWARE_mark">EstimateLine</span></strong>" ("EstimateLineItemRefListID", "EstimateLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="b22383be-9011-477c-b645-a3c31f2f1d86" class="GINGER_SOFTWARE_mark">EstimateLineRate</span>", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;"><span id="01db472f-0f55-46e3-9b40-fa22be9fa7ac" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('670004-1044572237', 'Building permit 1', <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.00000, 1.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Second Line </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "<strong><span id="314dc042-8656-4ca5-aa82-9b1d5b0d28e3" class="GINGER_SOFTWARE_mark">EstimateLine</span></strong>" ("EstimateLineItemRefListID", "EstimateLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="90dfb3b3-5939-4cc4-ba59-e36d7ca68166" class="GINGER_SOFTWARE_mark">EstimateLineRate</span>", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;"><span id="73701fed-31a0-4469-87d2-3d32ef0640a3" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('670004-1044572237', 'Building permit 2', <br />&nbsp;&nbsp;&nbsp;&nbsp; 2.00000, 2.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q2.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Third Line </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "<strong><span id="3663de54-17fd-44ab-b0d3-7c97dc00cb35" class="GINGER_SOFTWARE_mark">EstimateLine</span></strong>" ("EstimateLineItemRefListID", "EstimateLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="79bc4bf4-afa3-4db0-87e7-4f8254546a8f" class="GINGER_SOFTWARE_mark">EstimateLineRate</span>", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;"><span id="d099264a-8ef6-4a98-9c07-7f433f284867" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('670004-1044572237', 'Building permit 3', <br />&nbsp;&nbsp;&nbsp;&nbsp; 3.00000, 3.00, '10000-1011136881', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q3.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Shared Header Information</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "<strong>Estimate</strong>" ("CustomerRefListID", "TxnDate", "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp; "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", "BillAddressState", <br />&nbsp;&nbsp;&nbsp;&nbsp; "BillAddressPostalCode", "BillAddressCountry", "TermsRefListID", "DueDate", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="416506ed-a722-4d8c-ab37-634081cb7a78" class="GINGER_SOFTWARE_mark">ItemSalesTaxRefListID</span>", "Memo", "CustomerSalesTaxCodeRefListID") VALUES <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('4C0000-1040154668', {d'2021-12-01'}, '1', 'Brad Lamb', '1921 Appleseed Lane, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Bayshore', 'CA', '94326', 'USA', '50000-898307888', {d'2021-12-31'}, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '80000097-1481806775', 'Memo Test', '10000-1011136881')</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q4.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">The resulting Estimate in QuickBooks 2022&nbsp;Enterprise</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q5.png" alt="" /></span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">An Example of Creating Estimates for the USA and NON-USA QuickBooks Users (Header information in each line)</span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create One Estimate with Three Lines </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates one Estimate with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span id="7c41d7fe-b384-4bc6-b496-cb69b7a8f8fe" class="GINGER_SOFTWARE_mark">True except</span> <span id="9bf737b5-aa63-430d-bf8f-c4a1b71f9533" class="GINGER_SOFTWARE_mark">on</span> the <span style="color: #ff0000;">last</span> line. </span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286', <span style="color: #ff0000;">0</span>)</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create Three Estimates with One Line Each</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates three Estimates with one line each. Note the <span style="color: #ff0000;">FQSaveToCache</span> field is not specified (or can be set to <span style="color: #ff0000;">false</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First Estimate </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286')</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Second Estimate </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286')</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Third Estimate </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("CustomerRefListID", "RefNumber", "EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286')</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create One Estimate with Three Lines with All Shared Header Information</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates one Estimate with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span style="color: #ff0000;">True</span>. Saving the Estimate saves the lines with it.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>EstimateLine</strong>" ("EstimateLineItemRefListID", "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Shared Header Information</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "<strong>Estimate</strong>" ("CustomerRefListID", "TxnDate", "RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", "BillAddressCounty", "BillAddressPostalCode", "BillAddressCountry", "TermsRefListID", "DueDate", "ItemSalesTaxRefListID", "Memo", "CustomerTaxCodeRefListID") VALUES ('470001-1071525403', {d'2002-10-01'}, '1', 'Brad Lamb', '1921 Appleseed Lane', 'Bayshore', 'CA', '94326', 'USA', '10000-933272658', {d'2002-10-31'}, '2E0000-933272656', 'Memo Test', '10000-999022286')</span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Instructions</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; For multi-line Estimates, some may find it easier not to&nbsp;include the header information with each line item but rather to have separate smaller commands for each of the Estimate Lines and a final big INSERT for the Estimate header with all the Billing address details if required. The last example above shows a billing address, and memo added to the Estimate via the Estimate header table.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>Related Data Description</strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; All the values used are found on the tables of their name. Below are some examples.</span></p>
<p><span style="color: #0000ff; font-family: Arial,Helvetica,sans-serif;">EstimateLineItemRefListID</span><span style="font-family: Arial,Helvetica,sans-serif;"> is '670004-1044572237' and found like this:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, FullName from <strong>Item</strong> where FullName like 'I%'</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q6.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #0000ff; font-family: Arial,Helvetica,sans-serif;">EstimateLineSalesTaxCodeRefListID</span><span style="font-family: Arial,Helvetica,sans-serif;"> is '20000-1011136881' and found like this:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, Name from <strong>SalesTaxCode</strong> where Name like 'N%'</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q7.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #0000ff; font-family: Arial,Helvetica,sans-serif;">CustomerRefListID</span><span style="font-family: Arial,Helvetica,sans-serif;"> is '4C0000-1040154668' and found like this:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, FullName from <strong>Customer</strong> where FullName like 'Pete%'</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q8.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #0000ff; font-family: Arial,Helvetica,sans-serif;">ItemSalesTaxRefListID</span><span style="font-family: Arial,Helvetica,sans-serif;"> is '80000097-1481806775' and found like this:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, Name from <strong>ItemSalesTax</strong> where Name like 'G%'</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q9.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="color: #0000ff; font-family: Arial,Helvetica,sans-serif;">CustomerSalesTaxCodeRefListID</span><span style="font-family: Arial,Helvetica,sans-serif;"> is '10000-1011136881' and found like this:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select ListId, Name from SalesTaxCode where Name like 'T%'</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/2061/Q10.png" alt="" /></span></p>
<div class="ms-editor-squiggler" style="color: initial; font: initial; font-feature-settings: initial; font-kerning: initial; font-optical-sizing: initial; font-variation-settings: initial; text-orientation: initial; text-rendering: initial; -webkit-font-smoothing: initial; -webkit-locale: initial; -webkit-text-orientation: initial; -webkit-writing-mode: initial; writing-mode: initial; zoom: initial; place-content: initial; place-items: initial; place-self: initial; alignment-baseline: initial; animation: initial; appearance: initial; aspect-ratio: initial; backdrop-filter: initial; backface-visibility: initial; background: initial; background-blend-mode: initial; baseline-shift: initial; block-size: initial; border-block: initial; border: initial; border-radius: initial; border-collapse: initial; border-inline: initial; inset: initial; box-shadow: initial; box-sizing: initial; break-after: initial; break-before: initial; break-inside: initial; buffered-rendering: initial; caption-side: initial; caret-color: initial; clear: initial; clip: initial; clip-path: initial; clip-rule: initial; color-interpolation: initial; color-interpolation-filters: initial; color-rendering: initial; color-scheme: initial; columns: initial; column-fill: initial; gap: initial; column-rule: initial; column-span: initial; contain: initial; contain-intrinsic-size: initial; content: initial; content-visibility: initial; counter-increment: initial; counter-reset: initial; counter-set: initial; cursor: initial; cx: initial; cy: initial; d: initial; display: block; dominant-baseline: initial; empty-cells: initial; fill: initial; fill-opacity: initial; fill-rule: initial; filter: initial; flex: initial; flex-flow: initial; float: initial; flood-color: initial; flood-opacity: initial; grid: initial; grid-area: initial; height: initial; hyphens: initial; image-orientation: initial; image-rendering: initial; inline-size: initial; inset-block: initial; inset-inline: initial; isolation: initial; letter-spacing: initial; lighting-color: initial; line-break: initial; list-style: initial; margin-block: initial; margin: initial; margin-inline: initial; marker: initial; mask: initial; mask-type: initial; max-block-size: initial; max-height: initial; max-inline-size: initial; max-width: initial; min-block-size: initial; min-height: initial; min-inline-size: initial; min-width: initial; mix-blend-mode: initial; object-fit: initial; object-position: initial; offset: initial; opacity: initial; order: initial; origin-trial-test-property: initial; orphans: initial; outline: initial; outline-offset: initial; overflow-anchor: initial; overflow-wrap: initial; overflow: initial; overscroll-behavior-block: initial; overscroll-behavior-inline: initial; overscroll-behavior: initial; padding-block: initial; padding: initial; padding-inline: initial; page: initial; page-orientation: initial; paint-order: initial; perspective: initial; perspective-origin: initial; pointer-events: initial; position: initial; quotes: initial; r: initial; resize: initial; ruby-position: initial; rx: initial; ry: initial; scroll-behavior: initial; scroll-margin-block: initial; scroll-margin: initial; scroll-margin-inline: initial; scroll-padding-block: initial; scroll-padding: initial; scroll-padding-inline: initial; scroll-snap-align: initial; scroll-snap-stop: initial; scroll-snap-type: initial; shape-image-threshold: initial; shape-margin: initial; shape-outside: initial; shape-rendering: initial; size: initial; speak: initial; stop-color: initial; stop-opacity: initial; stroke: initial; stroke-dasharray: initial; stroke-dashoffset: initial; stroke-linecap: initial; stroke-linejoin: initial; stroke-miterlimit: initial; stroke-opacity: initial; stroke-width: initial; tab-size: initial; table-layout: initial; text-align: initial; text-align-last: initial; text-anchor: initial; text-combine-upright: initial; text-decoration: initial; text-decoration-skip-ink: initial; text-indent: initial; text-overflow: initial; text-shadow: initial; text-size-adjust: initial; text-transform: initial; text-underline-offset: initial; text-underline-position: initial; touch-action: initial; transform: initial; transform-box: initial; transform-origin: initial; transform-style: initial; transition: initial; user-select: initial; vector-effect: initial; vertical-align: initial; visibility: initial; -webkit-app-region: initial; border-spacing: initial; -webkit-border-image: initial; -webkit-box-align: initial; -webkit-box-decoration-break: initial; -webkit-box-direction: initial; -webkit-box-flex: initial; -webkit-box-ordinal-group: initial; -webkit-box-orient: initial; -webkit-box-pack: initial; -webkit-box-reflect: initial; -webkit-highlight: initial; -webkit-hyphenate-character: initial; -webkit-line-break: initial; -webkit-line-clamp: initial; -webkit-mask-box-image: initial; -webkit-mask: initial; -webkit-mask-composite: initial; -webkit-perspective-origin-x: initial; -webkit-perspective-origin-y: initial; -webkit-print-color-adjust: initial; -webkit-rtl-ordering: initial; -webkit-ruby-position: initial; -webkit-tap-highlight-color: initial; -webkit-text-combine: initial; -webkit-text-decorations-in-effect: initial; -webkit-text-emphasis: initial; -webkit-text-emphasis-position: initial; -webkit-text-fill-color: initial; -webkit-text-security: initial; -webkit-text-stroke: initial; -webkit-transform-origin-x: initial; -webkit-transform-origin-y: initial; -webkit-transform-origin-z: initial; -webkit-user-drag: initial; -webkit-user-modify: initial; white-space: initial; widows: initial; width: initial; will-change: initial; word-break: initial; word-spacing: initial; x: initial; y: initial; z-index: initial;">&nbsp;</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Inventory Adjustments using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2009]]></link>
<guid isPermaLink="false"><![CDATA[f1981e4bd8a0d6d8462016d2fc6276b3]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[ How to create Inventory Adjustments using QODBC
Example of Creating One Inventory Adjustment with Three Lines 
This example creates one Inventory Adjustment with three lines. Note the FQSaveToCache field, set to True except on the last one. 
Note: You...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;"> How to create Inventory Adjustments using QODBC</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating One Inventory Adjustment with Three Lines </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This example creates one Inventory Adjustment with three lines. Note the FQSaveToCache field, set to True except on the last one. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #000000;"><strong>Note</strong>: You must be in single-user mode for this to work.</span></span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/invtadjmultiusererr.JPG" alt="" width="633" height="395" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p align="left"><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InventoryAdjustmentLine" ("AccountRefListID", "TxnDate", "RefNumber", "Memo", "InventoryAdjustmentLineItemRefListID", "InventoryAdjustmentLineQuantityAdjustmentNewQuantity", "<span style="color: #0000ff;">FQSaveToCache</span>") VALUES ('320000-933270542', {d'2003-12-15'}, '1', 'Memo 1', '160000-933272656', 200.0, <span style="color: #0000ff;">1</span>)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/invtadj1.jpg" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InventoryAdjustmentLine" ("AccountRefListID", "TxnDate", "RefNumber", "Memo", "InventoryAdjustmentLineItemRefListID", "InventoryAdjustmentLineValueAdjustmentNewValue", "<span style="color: #0000ff;">FQSaveToCache</span>") VALUES ('10000-933270541', {d'2003-12-15'}, '1', 'Memo 2', '450000-1071511428', 100.0, <span style="color: #0000ff;">1</span>)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/invtadj2.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InventoryAdjustmentLine" ("AccountRefListID", "TxnDate", "RefNumber", "Memo", "InventoryAdjustmentLineItemRefListID", "InventoryAdjustmentLineQuantityAdjustmentNewQuantity", "<span style="color: #0000ff;">FQSaveToCache</span>") VALUES ('10000-933270541', {d'2003-12-15'}, '1', 'Memo 3', '440001-1071511796', 30.0, <span style="color: #0000ff;">0</span>)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/invtadj3.JPG" alt="" width="633" height="398" /></span></p>
<p align="left">&nbsp;</p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of Adjusting the Value of a Stock Item without Adjusting the Stock Quantity</span></h3>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Value in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This item has a COGS Average Cost of $69.73429:</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj1.JPG" alt="" width="599" height="481" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>INSERT query in QODBC</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Using QODBC, I adjusted the opening balance equity cost of the stock item by $250.00 using the following SQL insert statement:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InventoryAdjustmentLine" ("AccountRefFullName", "TxnDate", "RefNumber", "Memo",<br />"InventoryAdjustmentLineItemRefFullName", "InventoryAdjustmentLineValueAdjustmentNewValue", "FQSaveToCache") <br />VALUES ('Opening Bal Equity', {d'2007-05-23'}, '110', 'Value Adj 250', 'Wood Door:Exterior', 250.0, 0)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj2.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This item now has a COGS Average Cost of $106.69857:</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj3.JPG" alt="" width="600" height="482" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Display in Inventory valuation Detail Report </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The value adjustment details can be seen in the Inventory Valuation Detail:</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valuea
dj4.JPG" alt="" width="714" height="612" /></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of Adjusting the Quantity On Hand</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: InventoryAdjustmentLine transactions CAN NOT be edited, but to continue my example, you can adjust the quantity on hand at any point by using the following adjustment example, and QuickBooks will automatically make all the value adjustments for you:</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>INSRET Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InventoryAdjustmentLine" ("AccountRefFullName", "TxnDate", "RefNumber", "Memo",<br />"InventoryAdjustmentLineItemRefFullName", "InventoryAdjustmentLineQuantityAdjustmentNewQuantity", "FQSaveToCache") <br />VALUES ('Opening Bal Equity', {d'2007-05-23'}, '110', 'Qty Adj 4', 'Wood Door:Exterior', 4, 0)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj5.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The on-hand quantity and average cost are adjusted regardless of the previous value in the date sequence:</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj6.JPG" alt="" width="600" height="484" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Display in Inventory valuation Detail Report </strong></span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj7.JPG" alt="" width="708" height="629" /></span></p>
<p align="left">&nbsp;</p>
<h3 align="left"><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Example of Setting Quantity On-hand and Asset Value </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Using QODBC, you can override everything and set the quantity on hand and the value of the stock to whatever you want. In this example, I've reset the quantity on hand and the asset value by using this insert statement:</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InventoryAdjustmentLine" ("AccountRefFullName", "TxnDate", "RefNumber", "Memo",<br />"InventoryAdjustmentLineItemRefFullName", "<span style="color: #000080;">InventoryAdjustmentLineValueAdjustmentNewQuantity</span>", <br />"<span style="color: #993366;">InventoryAdjustmentLineValueAdjustmentNewValue</span>", "FQSaveToCache") <br />VALUES ('Opening Bal Equity', {d'2007-12-16'}, '110', 'Qty Adj 10 Value 1200', <br />'Wood Door:Exterior', <span style="color: #000080;">10</span>, <span style="color: #800080;">1200.0</span>, 0)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj8.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Which in turn has changed the average cost to $1200.00 / 10 = $120.00:</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj9.JPG" alt="" width="600" height="484" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Display in Inventory valuation Detail Report</strong></span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/valueadj10.JPG" alt="" width="705" height="629" /></span></p>
<p align="center">&nbsp;</p>
<p style="text-align: left;" align="center">&nbsp;</p>
<p style="text-align: left;" align="center"><br />QuickBooks SDK does not allow you to specify Site Location Name when you are using value adjustment.<br />Unfortunately, QuickBooks does not allow us to perform Quantity + Value + Site Location in a single command.<br /><br />You can either use the value adjustment or the quantity adjustment.</p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/2009/xyIcLL6A.png" alt=" alt=" /></span></p>
<p style="text-align: left;" align="center"><br /><br />Please try the following SQL statements</p>
<p style="text-align: left;" align="center"><br />INSERT INTO inventoryadjustmentline<br />(AccountRefFullName, InventorySiteRefFullName, Memo, InventoryAdjustmentLineItemRefFullName,<br />InventoryAdjustmentLineValueAdjustmentNewQuantity, InventoryAdjustmentLineValueAdjustmentNewValue, FQsaveToCache)<br />VALUES ('INVENTORY SPECIAL ADJUSTMENT', 'PARTS AND MATERIALS', 'CNVRT', 'AF0311860531',<br />3, 174, 0)<br /><br />Or<br /><br />INSERT INTO inventoryadjustmentline<br />(AccountRefFullName, InventorySiteRefFullName, Memo, InventoryAdjustmentLineItemRefFullName,<br />InventoryAdjustmentLineValueAdjustmentNewQuantity, InventoryAdjustmentLineValueAdjustmentNewValue,<br />InventoryAdjustmentLineQuantityAdjustmentSiteLocRefFullName, FQsaveToCache)<br />VALUES ('INVENTORY SPECIAL ADJUSTMENT', 'PARTS AND MATERIALS', 'CNVRT', 'AF0311860531',<br />3, 174, 'PARTS AND MATERIALS:P5', 0)<br /><br />Or<br /><br />INSERT INTO inventoryadjustmentline<br />(AccountRefFullName, InventorySiteRefFullName, Memo, InventoryAdjustmentLineItemRefFullName,<br />InventoryAdjustmentLineQuantityAdjustmentNewQuantity, InventoryAdjustmentLineQuantityAdjustmentSiteLocRefFullName, FQsaveToCache)<br />VALUES ('INVENTORY SPECIAL ADJUSTMENT', 'PARTS AND MATERIALS', 'CNVRT', 'AF0311860531',<br />3, 'PARTS AND MATERIALS:P5' , 0)<br /><br />Or<br /><br />Insert into inventoryadjustmentline (AccountRefListID, InventorySiteRefLIstID, InventoryAdjustmentLineItemRefListID, InventoryAdjustmentLineQuantityAdjustmentNewQuantity, InventoryAdjustmentLineQuantityAdjustmentLotNumber,InventoryAdjustmentLineQuantityAdjustmentSiteLocRefFullName) VALUES ('1D0001-896819777', '80000005-1418667219', '4D0002-1044564193', 856,'3 3','San Jose Warehouse:S12')<br /><br /><br />To perform a quantity and value adjustment to a bin location:<br /><br /><br />INSERT INTO inventoryadjustmentline<br />(AccountRefFullName, InventorySiteRefFullName, Memo, InventoryAdjustmentLineItemRefFullName,<br />InventoryAdjustmentLineQuantityAdjustmentNewQuantity, InventoryAdjustmentLineQuantityAdjustmentSiteLocRefFullName, FQsaveToCache)<br />VALUES ('INVENTORY SPECIAL ADJUSTMENT', 'PARTS AND MATERIALS', 'CNVRT', 'AF0311860531',<br />3, 'PARTS AND MATERIALS:P5' , 0)</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create an Other Charge Item using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1991]]></link>
<guid isPermaLink="false"><![CDATA[96055f5b06bf9381ac43879351642cf5]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Creating an OtherCharge Item 
Note: VB Demo is deprecated. 
Please refer to How to use the QODBC Test Tool for testing 
Note: To create a standard ItemOtherCharge item you can use an INSERT statement like follows: 
INSERT INTO ItemOtherC...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Creating an <span id="82beb99e-0a47-4c55-a586-b21b53386dd4" class="GINGER_SOFTWARE_mark">OtherCharge</span> Item </span></h2>
<h5><span style="color: #cc0000; font-family: Arial,Helvetica,sans-serif;">Note: VB Demo is deprecated. </span></h5>
<p>Please refer to <a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3069/" target="_blank">How to use the QODBC Test Tool for testing </a></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: To create a standard ItemOtherCharge item you can use <span id="77fe8ef9-afee-4c22-af2c-718e730c8e19" class="GINGER_SOFTWARE_mark">an</span> INSERT statement like follows: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ItemOtherCharge <br />("Name", "IsActive", "SalesORPurchaseDesc", <br />"<span id="e86f7d66-a49e-46cc-93bb-77c11e7010f4" class="GINGER_SOFTWARE_mark">SalesTaxCodeRefListID</span>", "SalesOrPurchasePrice", "SalesOrPurchaseAccountRefListID") <br />VALUES <br />('Equip Repairs', TRUE, 'Equipment Repair Charge', <br />'20000-999022286', 100.00, '190000-933270541')</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in VB Demo</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemOtherCharge.JPG" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;VB DEMO is to be used for testing of QODBC SQL queries only and is not a development tool.</p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The record above looks like this in QuickBooks 2007:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemOtherChargeQB.JPG" alt="" width="528" height="279" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: But before you add any new Other Charge, you should check the ITEM table first to see if the <span id="c244eef5-32be-427d-aa86-79205b64fa82" class="GINGER_SOFTWARE_mark">new Other</span> Charge <span style="color: #ff0000;">Name </span>is not already used in QuickBooks. The ITEM table is a combined list of all Item tables in QuickBooks: ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, and ItemGroup; with minimum common fields.<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When inserting a new <span style="color: #0000ff;">ItemOtherCharge</span> item the <span style="color: #ff0000;">Name</span> can't already be, for example, an ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, <span id="342336e4-d800-4e06-bf87-e947e4a36986" class="GINGER_SOFTWARE_mark">ItemService</span>, ItemFixedAsset, or ItemGroup <span id="8f70de2b-a966-4ae5-906b-7a3995627ab2" class="GINGER_SOFTWARE_mark">FullName</span> already. It must be a <span id="78eb5688-dd8d-4288-913d-dbde07c926f1" class="GINGER_SOFTWARE_mark">unique</span> new ITEM FullName!</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">How to locate the Item <span id="7a7331ce-f129-4dc6-9d32-f7ac7d4f79b9" class="GINGER_SOFTWARE_mark">FullName</span></span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To see the item <span id="7c337ddd-5052-443e-ae03-9a2f3e679dd7" class="GINGER_SOFTWARE_mark">full names</span>, you can run the following query in VB Demo:<br /> <br /> <strong>&nbsp;&nbsp;&nbsp;&nbsp; SELECT <span id="ae9a0038-813e-4585-b9f7-ace30f9742f9" class="GINGER_SOFTWARE_mark">ListID</span>, FullName, Description, Type FROM Item</strong><br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In my case, my Australian QuickBooks 2004 sample file returned the following items:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/images/itemsm.jpg" alt="" width="640" height="248" border="0" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; And like ITEM there's an ENTITY table that's the combined list of all entity tables in QuickBooks: Customers, Employees, Other names, and Vendors; with minimum common fields.<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So when inserting a new Customer name the <span id="22198eb0-16a2-48cc-91d5-d438b05d5546" class="GINGER_SOFTWARE_mark">FullName</span> can't be, for example, a Customer, Employee, Other name, or Vendor already. It must be a unique new ENTITY FullName in QuickBooks!</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See also: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1772" target="_blank">How to insert data into ItemNonInventory using QODBC</a></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to convert an Estimate to a Sales Order using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1983]]></link>
<guid isPermaLink="false"><![CDATA[1e4d36177d71bbb3558e43af9577d70e]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Converting an Estimate to a Sales Order 
Note: VB Demo is deprecated. 
Please refer to How to use the QODBC Test Tool for testing 
CREATE AN ESTIMATE WITH ONE LINE 
Query in QODBC 
&nbsp;&nbsp;&nbsp;&nbsp; The following SQL statement wi...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Converting an Estimate to a Sales Order </span></h2>
<h5><span style="color: #cc0000; font-family: Arial,Helvetica,sans-serif;">Note: VB Demo is deprecated. </span></h5>
<p>Please refer to <a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3069/" target="_blank">How to use the QODBC Test Tool for testing </a></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE AN ESTIMATE WITH ONE LINE </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The following SQL statement will create a new estimate:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "<span id="4e562298-561b-4383-9487-8132b19b52f2" class="GINGER_SOFTWARE_mark">EstimateLine</span>" ("CustomerRefListID", "<span style="color: #0000ff;">RefNumber</span>", "EstimateLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;"><span id="e33cc59b-9415-42f3-8c27-797480e996b6" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('470001-1071525403', '<span style="color: #0000ff;">201</span>', '250000-933272656', <br />&nbsp;&nbsp;&nbsp;&nbsp; 'Building permit No 201', 100.00000, 100.00, '20000-999022286', <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/estimateline.JPG" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;VB DEMO is to be used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The query above results in the following estimate in the QuickBooks 2006 Premier USA Edition - Sample Rock Castle Construction company file:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/estimatelineQB.JPG" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2061" target="_blank">How to create Estimates using QODBC</a> for more about Estimates Creating.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE A SALES ORDER FROM AN ESTIMATE</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; When we're ready to create the Sales Order, we can read the EstimateLine table and insert it into the SalesOrderLine table like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "SalesOrderLine" ("CustomerRefListID", "RefNumber", "Memo", "SalesOrderLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "SalesOrderLineDesc", "SalesOrderLineRate", "SalesOrderLineAmount", "SalesOrderLineSalesTaxCodeRefListID",<br />&nbsp;&nbsp;&nbsp;&nbsp; "FQSaveToCache") <br />&nbsp;&nbsp;&nbsp;&nbsp; Select "CustomerRefListID", "<span style="color: #000000;">RefNumber</span>", {fn CONCAT('Estimate ', "<span style="color: #0000ff;">RefNumber</span>")} as "Memo","EstimateLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "FQSaveToCache" from EstimateLine where <span style="color: #000000;">"<span style="color: #0000ff;">RefNumber</span>"='<span style="color: #0000ff;">201</span>'</span> and "EstimateLineSeqNo"=1</span></p>
<p><strong><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Note</span></strong><span style="font-family: Arial, Helvetica, sans-serif;">: This is one complete SQL statement. For multiple estimate lines, you would set <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">1</span> instead (using:1 as "FQSaveToCache") and loop the EstimateLineSeqNos until the last one setting <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">0</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/estimatetosalesorder.JPG" alt="" width="633" height="398" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The estimate now appears as a Sales Order in QuickBooks with "Estimate 201" in the memo field, the same way QuickBooks creates a Sales Order from an Estimate.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/estimatetosalesorderQB.JPG" alt="" width="593" height="448" /></span><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Checks using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1893]]></link>
<guid isPermaLink="false"><![CDATA[56f9f88906aebf4ad985aaec7fa01313]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Creating Checks
Note: You can only insert into the CheckItemLine or CheckExpenseLine table. The Check table is a header table and cannot be inserted. 
Create One Check with Three Item Lines and one Expense Line
This creates one Check with...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Creating Checks</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: You can only insert into the <strong>CheckItemLine</strong> or <strong>CheckExpenseLine</strong> table. The Check table is a header table and cannot be inserted. </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Check with Three Item Lines and one Expense Line</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This creates one Check with three Item Lines and one Expense Line. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to True except on the <span style="color: #ff0000;">last</span> line.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">First Item Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>CheckItemLine</strong>" ("<span style="color: #0000ff;">AccountRefListID</span>", "<span style="color: #6633cc;">PayeeEntityRefListID</span>", "TxnDate", "RefNumber", "Memo", "IsToBePrinted", "<span style="color: #006633;">ItemLineItemRefListID</span>", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "ItemLineCustomerRefListID", "ItemLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('<span style="color: #0000ff;">20000-933270541</span>', '<span style="color: #6633cc;">300000-933272659</span>', {d'2002-10-01'}, '1', 'Memo 1', 0, '<span style="color: #006633;">250000-933272656</span>', 'Building permit', 100.00, 100.00, '250000-933272658', 'Billable', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Second item Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>CheckItemLine</strong>" ("<span style="color: #0000ff;">AccountRefListID</span>", "<span style="color: #6633cc;">PayeeEntityRefListID</span>", "TxnDate", "RefNumber", "Memo", "IsToBePrinted", "<span style="color: #006633;">ItemLineItemRefListID</span>", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "ItemLineCustomerRefListID", "ItemLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('<span style="color: #0000ff;">20000-933270541</span>', '<span style="color: #6633cc;">300000-933272659</span>', {d'2002-10-01'}, '1', 'Memo 2', 0, '<span style="color: #006633;">250000-933272656</span>', 'Building permit', 200.00, 200.00, '250000-933272658', 'Billable', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Third Item Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>CheckItemLine</strong>" ("<span style="color: #0000ff;">AccountRefListID</span>", "<span style="color: #6633cc;">PayeeEntityRefListID</span>", "TxnDate", "RefNumber", "Memo", "IsToBePrinted", "<span style="color: #006633;">ItemLineItemRefListID</span>", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "ItemLineCustomerRefListID", "ItemLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('<span style="color: #0000ff;">20000-933270541</span>', '<span style="color: #6633cc;">300000-933272659</span>', {d'2002-10-01'}, '1', 'Memo 3', 0, '<span style="color: #006633;">250000-933272656</span>', 'Building permit', 300.00, 300.00, '250000-933272658', 'Billable', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>One Expense Line (Last Line) </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> INSERT INTO "<strong>CheckExpenseLine</strong>" ("<span style="color: #990000;">ExpenseLineAccountRefListID</span>", "ExpenseLineAmount", "ExpenseLineMemo", "ExpenseLineCustomerRefListID", "ExpenseLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('<span style="color: #990000;">320000-933270542</span>', 600.00, 'Memo 1', '250000-933272658', 'Billable', <span style="color: #ff0000;">0</span>)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Check with Three Item Lines and one Expense Line with All Shared Header Information </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This creates one Check with three Item Lines and one Expense Line. Note that the <span style="color: #ff0000;">FQSaveToCache</span> field is set to True and uses <strong>Check</strong> to save Check info and save.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Item Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> INSERT INTO "<strong>CheckItemLine</strong>" ("<span style="color: #006633;">ItemLineItemRefListID</span>", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "ItemLineCustomerRefListID", "ItemLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('<span style="color: #006633;">250000-933272656</span>', 'Building permit', 100.00, 100.00, '250000-933272658', 'Billable', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Item Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> INSERT INTO "<strong>CheckItemLine</strong>" ("<span style="color: #006633;">ItemLineItemRefListID</span>", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "ItemLineCustomerRefListID", "ItemLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('<span style="color: #006633;">250000-933272656</span>', 'Building permit', 200.00, 200.00, '250000-933272658', 'Billable', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Item Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> INSERT INTO "<strong>CheckItemLine</strong>" ("<span style="color: #006633;">ItemLineItemRefListID</span>", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "ItemLineCustomerRefListID", "ItemLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('<span style="color: #006633;">250000-933272656</span>', 'Building permit', 300.00, 300.00, '250000-933272658', 'Billable', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">One Expense Line </span></strong><br /> <br /> INSERT INTO "<strong>CheckExpenseLine</strong>" ("ExpenseLineAccountRefListID", "ExpenseLineAmount", "ExpenseLineMemo", "ExpenseLineCustomerRefListID", "ExpenseLineBillableStatus", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('320000-933270542', 600.00, 'Expense Memo 1', '250000-933272658', 'Billable', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Shared Header Information</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Check</strong>" ("<span style="color: #0000ff;">AccountRefListID</span>", "<span style="color: #6633cc;">PayeeEntityRefListID</span>", "TxnDate", "RefNumber", "Memo", "IsToBePrinted") VALUES ('<span style="color: #0000ff;">20000-933270541</span>', '<span style="color: #6633cc;">300000-933272659</span>', {d'2002-10-01'}, '1', 'Check Memo 1', 0)</span></p>
<p>&nbsp;</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6633cc;">An Example of Apply Check Payments or Credits to Bills </span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Related Data Description </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">PayeeEntityRefListID = 'C0000-933272656'&nbsp;&nbsp;&nbsp;&nbsp; (Required)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">BankAccountRefListID = '20000-933270541'&nbsp;&nbsp;&nbsp;&nbsp; (Required)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">IsToBePrinted = 1&nbsp;&nbsp;&nbsp;&nbsp; (Either this one or RefNumber is required)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">AppliedToTxnTxnID = '2F78-1071505657','976-933373192','A2D-933373874'&nbsp;&nbsp;&nbsp;&nbsp; (Find from <strong>Bill</strong> Table)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">AppliedToTxnPaymentAmount = 200.75&nbsp;&nbsp;&nbsp;&nbsp; (Necessary)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">AppliedToTxnSetCreditCreditTxnID = '5522-1197768491'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Find from <strong>VendorCredit</strong> Table)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">AppliedToTxnSetCreditAppliedAmount = 10.00</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">TxnDate = 2007-12-15</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Apply Check Payments to Bills </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO <strong>BillPaymentCheckLine</strong> (PayeeEntityRefListID, BankAccountRefListID, IsToBePrinted, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, TxnDate, <span style="color: #ff0000;">FQSaveToCache</span>) Values ('C0000-933272656', '20000-933270541', 1, '2F78-1071505657', 200.75, {d'2007-12-15'}, <span style="color: #ff0000;">0</span>)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Apply Credits to Bills </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO <strong>BillPaymentCheckLine</strong> (PayeeEntityRefListID, BankAccountRefListID, IsToBePrinted, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, AppliedToTxnSetCreditCreditTxnID, AppliedToTxnSetCreditAppliedAmount, TxnDate,<span style="color: #ff0000;">FQSaveToCache</span>) Values ('C0000-933272656', '20000-933270541', 1, '2F78-1071505657', 200.75, '5522-1197768491', 10.00, {d'2007-12-15'}, <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #000066;"><strong><span style="color: #000000;">Note</span></strong>: </span>If you add a check, the payee must use the same currency as the source bank account. If you don't, you get an error about the currency not being the same as the base currency, but it isn't clear that the message is about the payee and not the account. This message is coming back from QuickBooks qbXML SDK, which doesn't handle this very well (in the user interface it will let you do it and change the bank account to one that is in the correct currency - without telling you).</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to insert data into ItemNonInventory using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1772]]></link>
<guid isPermaLink="false"><![CDATA[299570476c6f0309545110c592b6a63b]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Add a Non-Inventory Item with the "This item is used in assemblies or is purchased for a specific customer:&nbsp;job" field checked.
Note: VB Demo is deprecated. 
Please refer to How to use the QODBC Test Tool for testing 
Instructions for this Option...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Add a Non-Inventory Item with the "This item is used in assemblies or <span id="aee3a58e-923d-47b7-83d8-dc18774bd19a" class="GINGER_SOFTWARE_mark">is purchased</span> for a specific customer<span id="92b0cb1c-1a79-4c53-8b05-db9bef7c5ffc" class="GINGER_SOFTWARE_mark">:&nbsp;</span>job" field checked.</span></h2>
<h5><span style="color: #cc0000; font-family: Arial,Helvetica,sans-serif;">Note: VB Demo is deprecated. </span></h5>
<p>Please refer to <a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3069/" target="_blank">How to use the QODBC Test Tool for testing </a></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Instructions for this Option</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="9c1b3b3d-af86-4de3-bb0a-88d5f4476290" class="GINGER_SOFTWARE_mark">There's</span> no column for "<strong>This item is used in assemblies or is purchased for a specific customer<span id="4980f622-cea3-49c2-82e1-5ea83eac9491" class="GINGER_SOFTWARE_mark">:&nbsp;</span>job</strong>." It's actually controlled by the columns used in the INSERT statement. For example, when I execute as follows:</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Query in QODBC </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO <strong>ItemNonInventory</strong> <br />("Name", "IsActive", "SalesTaxCodeRefListID", "SalesAndPurchaseSalesDesc", <br />"SalesAndPurchaseSalesPrice","SalesAndPurchaseIncomeAccountRefListID", "SalesAndPurchasePurchaseDesc", <br />"SalesAndPurchasePurchaseCost", "SalesAndPurchaseExpenseAccountRefListID", "SalesAndPurchasePrefVendorRefListID") <br />VALUES <br />('Support Ticket', TRUE, '10000-999022286', 'Callback VoIP Charge', <br />33.00, '1D0000-933270542', 'CallBack VoIP', <br />33.00, '4D0000-933270542', '140000-933272657')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemNonInventory1.JPG" alt="" width="562" height="398" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;VB DEMO is to be used only to test QODBC SQL queries and is not a development tool.</p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Then can get the result with the option "</span><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">This item is used in assemblies or is purchased for a specific customer: job</span><span style="font-family: Arial, Helvetica, sans-serif;">":</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemNonInventory2.JPG" alt="" width="599" height="346" /></span></p>
<p>&nbsp;</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating a Standard Non-Inventory Item</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: To create a standard Non Inventory Part, you can use a simplified INSERT statement like the one below.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Query in QODBC </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO <strong>ItemNonInventory</strong> <br />("Name", "IsActive", "SalesORPurchaseDesc", <br />"SalesTaxCodeRefListID", "SalesOrPurchasePrice", "SalesOrPurchaseAccountRefListID") <br />VALUES <br />('QODBC NonInventory Test', TRUE, 'Test Insert of Non Inventory Part', <br />'20000-999022286', 100.00, '190000-933270541')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemNonInventory3.JPG" alt="" width="562" height="398" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Which looks like this in QuickBooks 2006 instead:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemNonInventory4.JPG" alt="" width="528" height="281" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Notes</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Unique Item FullName</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Before you add any new Non-Inventory part, you should check the <strong>ITEM</strong> table first to see if the new Non-Inventory part <span style="color: #990000;">Name </span>is not already used in QuickBooks. The ITEM table is a combined list of all Item tables in QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, and ItemGroup (with minimum common fields)<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When inserting a new <span style="color: #0000ff;">ItemNonInventory</span> item, the <span style="color: #990000;">Name</span> can't already be, for example, an ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, or ItemGroup FullName already. It must be a unique new ITEM FullName!</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Locate Item FullName </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To see the complete item names, you can run the following query in VB Demo:<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT ListID, FullName, Description, Type FROM Item<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In my case, my Australian QuickBooks 2004 sample file returned the following items:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/www.qodbc.com.au/images/itemsm.jpg" alt="" width="640" height="248" border="0" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Entity Table Reference</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; And like ITEM, there's an ENTITY table that's the combined list of all entity tables in QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Customers, Employees, Other names, and Vendors (with minimum common fields)<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So when inserting a new Customer name, the FullName can't be, for example, a Customer, Employee, Other names, or Vendor already. It must be a unique new ENTITY FullName in QuickBooks!</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See also: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1135" target="_blank">How to add an Inventory Item using QODBC</a>.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Supplier Credits (VendorCredit)]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1744]]></link>
<guid isPermaLink="false"><![CDATA[418ef6127e44214882c61e372e866691]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of creating VendorCredit 
Creates one VendorCredit with Three Lines
 Note: This creates one VendorCredit with three lines. Note the FQSaveToCache field, set to True except on the last one. 
Note: The primary rule is first to save the data to...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">An Example of creating VendorCredit </span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Creates one VendorCredit with Three Lines</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> <strong>Note</strong>: This creates one VendorCredit with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to True except on the <span style="color: #ff0000;">last</span> one. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Note: The primary rule is first to save the data to the child record. The child record for each parent/child pair has all the data required by the parent record.<br />Please do not close the connection between the Insert of Child / Header &amp; <a id="SP_LASTINSERTID" href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2342/#SP_LASTINSERTID" target="_blank">sp_lastinsertID</a> otherwise. You will not be able to get the last inserted ID.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "VendorCreditItemLine" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "Memo", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineQuantity", "ItemLineAmount", "ItemLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('90000-933272656', 'C0000-933270541', {d'2003-12-15'}, '1', 'Memo Test', 'E0000-933272656', 'Install tile or counter', 1.11, 1.00, 1.11, '280000-933272658', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong><span style="color: #990000;">Second Line </span></strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "VendorCreditItemLine" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "Memo", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineQuantity", "ItemLineAmount", "ItemLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('90000-933272656', 'C0000-933270541', {d'2003-12-15'}, '1', 'Memo Test', 'D0000-933272656', 'Roofing', 2.22, 2.00, 4.44, '280000-933272658', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong><span style="color: #990000;">Third (Last) Line </span></strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "VendorCreditItemLine" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "Memo", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineQuantity", "ItemLineAmount", "ItemLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('90000-933272656', 'C0000-933270541', {d'2003-12-15'}, '1', 'Memo Test', '250000-933272656', 'Permit', 3.33, 3.00, 9.99, '280000-933272658', <span style="color: #ff0000;">0</span>)</span></p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Create One VendorCredit with Three Lines with All Shared Header Information </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Note</strong>: This creates one VendorCredit with three lines. Saving the VendorCredit will save the lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span style="color: #ff0000;">True</span>.</span></p>
<p><span style="color: #990000; font-family: Arial,Helvetica,sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "VendorCreditItemLine" ("ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineQuantity", "ItemLineAmount", "ItemLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('E0000-933272656', 'Install tile or counter', 1.11, 1.00, 1.11, '280000-933272658', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong><span style="color: #990000;">Second Line</span></strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "VendorCreditItemLine" ("ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineQuantity", "ItemLineAmount", "ItemLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('D0000-933272656', 'Roofing', 2.22, 2.00, 4.44, '280000-933272658', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong><span style="color: #990000;">Third Line</span></strong></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">INSERT INTO "VendorCreditItemLine" ("ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineQuantity", "ItemLineAmount", "ItemLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Permit', 3.33, 3.00, 9.99, '280000-933272658', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial,Helvetica,sans-serif;">Shared Header Information</span></strong></span></p>
<p>INSERT INTO "VendorCredit" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "Memo") VALUES ('90000-933272656', 'C0000-933270541', {d'2003-12-15'}, '1', 'Memo Test')</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Bills using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1626]]></link>
<guid isPermaLink="false"><![CDATA[bc573864331a9e42e4511de6f678aa83]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Example of Creating Bills using BillItemLine Table 
Create One Bill with Three Lines
Note: This creates one Bill with three lines. Note the FQSaveToCache field, set to True except on the last line. 
Note: The primary rule is first to save the data to t...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating Bills using BillItemLine Table </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Bill with Three Lines</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates one Bill with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span id="0b6228f6-a850-4010-87ac-9e869c3e2ddd" class="GINGER_SOFTWARE_mark">True except</span> <span id="96917637-4583-4d04-9298-76d177a52bf2" class="GINGER_SOFTWARE_mark">on</span> the <span style="color: #ff0000;">last</span> line. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note: </strong>The primary rule is first to save the data to the child record. The child record for each parent/child pair has all the data required by the parent record.<br />You cannot insert into the Bill table without inserting the child table(s) like BillExpenseLine / BillItemLine. Please do not close the connection between the Insert Bill / BillExpenseLine / BillItemLine. You will not be able to get the last inserted ID.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("VendorRefListID", "RefNumber", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('10000-933272655', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("VendorRefListID", "RefNumber", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('10000-933272655', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third (Last) Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("VendorRefListID", "RefNumber", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('10000-933272655', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00, <span style="color: #ff0000;">0</span>)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create Three Bills with One Line Each </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates three bills with one line each. Note the <span style="color: #ff0000;">FQSaveToCache</span> field is not specified (or can be set to <span style="color: #ff0000;">false</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Bill </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("VendorRefListID", "RefNumber", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount") VALUES ('10000-933272655', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Bill </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("VendorRefListID", "RefNumber", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount") VALUES ('10000-933272655', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Bill </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("VendorRefListID", "RefNumber", "ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount") VALUES ('10000-933272655', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Bill with Three Item Lines with Shared Header Information </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates one Bill with three-item lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span style="color: #ff0000;">True</span>. Saving the Bill saves the lines with it.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 1', 1.00000, 1.00, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 2', 2.00000, 2.00, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("ItemLineItemRefListID", "ItemLineDesc", "ItemLineCost", "ItemLineAmount", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Shared Header Information</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Bill</strong>" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "TermsRefListID", "DueDate", "Memo") VALUES ('10000-933272655', 'C0000-933270541', {d'2002-10-01'}, '1', '10000-933272658', {d'2002-10-31'}, 'Memo Test')</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating Bills using BillExpenseLine Table </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Bill with Two Expense Lines with Shared Header Information</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates one Bill with two expense lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span style="color: #ff0000;">True</span>. Saving the Bill saves the lines with it.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">First Line </span></strong><br /> <br />INSERT INTO "<strong>BillExpenseLine</strong>" ("ExpenseLineAccountRefListID", "ExpenseLineAmount", "ExpenseLineMemo", "ExpenseLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('370001-909762877', 436.07, 'Expense Line Memo Test 1', '4C0000-1040154668', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillExpenseLine</strong>" ("ExpenseLineAccountRefListID", "ExpenseLineAmount", "ExpenseLineMemo", "ExpenseLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('370001-909762877', 436.06, 'Expense Line Memo Test 2', '4C0000-1040154668', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q2.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Shared Header Information </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Bill</strong>" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "TermsRefListID", "DueDate", "Memo") VALUES ('390000-1039739488', 'C0000-896817249', {d'2021-12-15'}, '1', '50000-898307888', {d'2021-12-31'}, 'Expense Memo Test')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q3.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q4.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Special Instructions and Examples for Australian Users </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: For Australian users, use the following SQL Statements using <span style="color: #0000ff;">ExpenseLineTaxCodeRefListID</span> (for GST) and these modified values to create a single line expense bill for "Optical Phone Networks" in the sample Stadium Construction company file supplied with QuickBooks in Australia located at :<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C:\Program Files\Intuit\QuickBooks Premier\Stadium Construction and Hardware Pty Ltd QB Premier.qbw</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Single Expense Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillExpenseLine</strong>" ("ExpenseLineAccountRefListID", "ExpenseLineAmount", "ExpenseLineMemo", "<span style="color: #0000ff;">ExpenseLineTaxCodeRefListID</span>", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('270000-1045536344', 500.00, 'QODBC Expense Line Memo Test 1', '<span style="color: #0000ff;">C0000-1045536338</span>', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Header Information</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Bill</strong>" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "TermsRefListID", "DueDate", "Memo") VALUES ('200000-1045537156', '3D0000-1045609540', {d'2004-11-17'}, '1', '20000-1045536343', {d'2004-12-31'}, 'QODBC Bill Expense Memo Test')</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Related Data Location </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Never enter a tax value, as QuickBooks generates the tax amount based on the </span><span style="color: #0000ff; font-family: Arial, Helvetica, sans-serif;">ExpenseLineTaxCodeRefListID </span><span style="font-family: Arial, Helvetica, sans-serif;">being used.&nbsp;</span><span style="color: #0000ff; font-family: Arial, Helvetica, sans-serif;">ExpenseLineTaxCodeRefListID</span><span style="font-family: Arial, Helvetica, sans-serif;"> is the ListID for GST found in the TaxCode Table. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Use the following SQL Statement in VB Demo to locate the ListID: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT * FROM TaxCode</span></p>
<p><strong><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Also Note:</span></strong><span style="font-family: Arial, Helvetica, sans-serif;"> The <strong>ExpenseLineCustomerRefListID</strong> or <strong>ExpenseLineAccountRefFullName</strong> is found by doing something like: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select ListID, Fullname from customer where FullName like 'D%.'</span></p>
<p><span style="font-family: Verdana;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q5.png" alt="" /></span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating Bills using ExpenseLine without ExpenseLineCustomerRefListID</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> <strong>Note</strong>: You can leave out <span style="color: #0000ff;">ExpenseLineCustomerRefListID</span> altogether; you can't say you will use it and then try to insert a null.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create a Single Line Expense Bill without ExpenseLineCustomerRefListID</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> The following example also works:</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Single Expense Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillExpenseLine</strong>" ("ExpenseLineAccountRefListID", "ExpenseLineAmount", "ExpenseLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('370001-909762877', 436.07, 'Expense Line Memo Test 100', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Verdana;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q6.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Header Information </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Bill</strong>" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", "TermsRefListID", "DueDate", "Memo") VALUES ('390000-1039739488', 'C0000-896817249', {d'2021-12-15'}, '100', '50000-898307888',{d'2021-12-31'}, 'Expense Memo Test')</span></p>
<p><span style="font-family: Verdana;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q7.png" alt="" /></span></p>
<h4><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks </span></h4>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q8.png" alt="" /></span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">ListID and FullName References </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: When doing INSERTs, you need to use either the ListID or FullName reference, so if you know the Vendor's name and the account name you can select to use the <strong>FullName</strong> like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Bill</strong>" ("<span style="color: #0000ff;">VendorRefFullName</span>", "<span style="color: #6633cc;">APAccountRefFullName</span>", "TxnDate", "RefNumber", "DueDate", "Memo") <br />VALUES ('ABC', 'Accounts Payable', {d'2006-06-26'}, '100', {d'2006-06-30'}, 'Expense Memo Test 5' )</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">instead of the <strong>ListIDs</strong> like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Bill</strong>" ("<span style="color: #0000ff;">VendorRefListID</span>", "<span style="color: #6633cc;">APAccountRefListID</span>", "TxnDate", "RefNumber", "DueDate", "Memo") <br />VALUES ('10000-933272655', 'C0000-933270541', {d'2002-10-01'}, '100', {d'2002-10-31'}, 'Memo Test')</span></p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <span style="color: #6633cc;">Example of a VB Script Code about Bill Insert </span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">code in vbscript</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Option Explicit<br />Const vbNormal = 1</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">const adOpenStatic = 3<br />Const adLockOptimistic = 3<br />Const AdUseClient = 3</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Dim oRecordset3, oConnection3, sSQL, ssSQL</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Set oConnection3 = CreateObject("ADODB.Connection")<br />oConnection3.Open "DSN=Quickbooks Data;OLE DB Services=-2"<br />sSQL = "SELECT * FROM BillExpenseLine WHERE TxnId = 'X'"</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Set oRecordset3 = CreateObject("ADODB.Recordset")<br />oRecordset3.Open sSQL, oConnection3, adOpenStatic, adLockOptimistic</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> oRecordset3.Addnew()<br />oRecordset3.Fields("ExpenseLineAccountRefListID").Value = "8C0001-1197740053"<br />oRecordset3.Fields("ExpenseLineAmount").Value = 150000<br />oRecordset3.Fields("ExpenseLineMemo").Value = "TESTMEMO0000"<br />oRecordset3.Fields("ExpenseLineCustomerRefListID").Value = "890000-1047591941"<br />oRecordset3.Fields("FQSaveToCache").Value = 1<br />oRecordset3.Update()</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">ssSQL = "SELECT * FROM Bill WHERE TxnId = 'X'"</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Set oRecordset3 = CreateObject("ADODB.Recordset")<br />oRecordset3.Open ssSQL, oConnection3, adOpenStatic, adLockOptimistic</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> oRecordset3.Addnew()<br />oRecordset3.Fields("VendorRefListID").Value = "2F0004-1197735443"<br />oRecordset3.Fields("APAccountRefListID").Value = "C0000-896817249"<br />oRecordset3.Fields("TxnDate").Value = "2/16/2007"<br />oRecordset3.Fields("RefNumber").Value = "TEST123NUMB"<br />oRecordset3.Fields("TermsRefListID").Value = "20000-898307885"<br />oRecordset3.Fields("DueDate").Value = "3/16/2007"<br />oRecordset3.Fields("Memo").Value = "TESTMEMO2"<br />oRecordset3.Update()</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">oRecordset3.Close<br />oConnection3.Close</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">msgbox "end of process."<br />WScript.Quit</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Data Description </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">'********************************//****************************************<br />'*TABLE DETAIL REFERENCE: BillExpenseLine <br />'*<br />'*FIELD RELATIONSHIPS: (BillExpenseLine ) . ExpenseLineAccountRefListID <br />'*TABLE FIELD CATEGORY <br />'*Account ListID List <br />'*("ExpenseLineAccountRefListID").Value = "8C0001-1197740053"<br />'*<br />'*FIELD RELATIONSHIPS: (BillExpenseLine ) . ExpenseLineCustomerRefListID <br />'*TABLE FIELD CATEGORY <br />'*CustomerListID List <br />'*("ExpenseLineCustomerRefListID").Value = "890000-1047591941" stern<br />'*<br />'*TABLE DETAIL REFERENCE: Bill <br />'*FIELD RELATIONSHIPS: (Bill ) . VendorRefListID <br />'*TABLE FIELD CATEGORY <br />'*Vendor ListID List <br />'*("VendorRefListID").Value = "2F0004-1197735443" german<br />'*<br />'*FIELD RELATIONSHIPS: (Bill ) . APAccountRefListID <br />'*TABLE FIELD CATEGORY <br />'*Account ListID List <br />'*("APAccountRefListID").Value = "C0000-896817249" german<br />'*<br />'*FIELD RELATIONSHIPS: (Bill ) . TermsRefListID <br />'*TABLE FIELD CATEGORY <br />'*Terms ListID List <br />'*("TermsRefListID").Value = "20000-898307885" net 30<br />'********************************//****************************************</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q9.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <br /> <br /> </span></p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Insert Both BillItems and BillExpenses into One Bill </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Note: You can insert BillItems and BillExpenses into one Bill, but you need to create either the Expense or Item lines and then add the Item or Expense lines afterward, like below.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create the Expense Lines</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillExpenseLine</strong>" ("ExpenseLineAccountRefListID", "ExpenseLineAmount", <br />"ExpenseLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") <br />VALUES ('370001-909762877', 436.07, <br />'Expense Line Memo Test,' <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q10.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Write the Bill Header</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>Bill</strong>" ("VendorRefListID", "APAccountRefListID", "TxnDate", "RefNumber", <br />"TermsRefListID", "DueDate", "Memo") <br />VALUES ('390000-1039739488', 'C0000-896817249',{d'2021-12-15'}, '905', <br />'50000-898307888', {d'2021-12-31'}, 'Test Expense and Item Lines')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q11.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Determine the TxnID of the new Bill</span></h3>
<p><span style="color: #0000ff; font-family: Arial, Helvetica, sans-serif;">sp_lastinsertID</span><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"> Bill</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q12.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Use the TxnID to append Item lines to the existing Bill</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The <span style="color: #0000ff;">LastInsertID</span> returned was: <span style="color: #0000ff;">8C19-1481810539</span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillItemLine</strong>" ("<span style="color: #0000ff;">TxnID</span>", "ItemLineItemRefListID", <br />"ItemLineDesc", "ItemLineCost", "ItemLineAmount") <br />VALUES ('<span style="color: #0000ff;">8C19-1481810539</span>', '8C0003-1044564690', <br />'Building permit 1', 1.00000, 1.00)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q13.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">This results in the following Bill in QuickBooks with both an Expense and Item line:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1626/Q14.png" alt="" /><br /> <img src="https://support.flexquarters.com/esupport/newimages/1626/Q15.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating a Bill with One Item on QuickBooks Online Edition </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">That would look something like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>BillExpenseLine</strong>" <span style="color: #000080;">("<span style="color: #0000ff;">VendorRefListID</span>",</span></span> <span style="font-family: Arial, Helvetica, sans-serif;">"TxnDate", "RefNumber",<br /> <span style="color: #800080;">"<span style="color: #6633cc;">ExpenseLineAccountRefListID</span>",</span></span> <span style="font-family: Arial, Helvetica, sans-serif;">"ExpenseLineAmount", "ExpenseLineMemo", "FQSaveToCache") <br />VALUES (<span style="color: #003366;">'<span style="color: #0000ff;">2</span></span>', {d'2007-11-22'}, 'TestRefNum_1',<br /> <span style="color: #800080;">'<span style="color: #6633cc;">22</span>'</span>, 436.07, 'QBOE Expense Line Memo Test', 0)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Where "<span style="color: #0000ff;">VendorRefListID</span><span style="color: #003366;">"</span> is found from the Vendor table and "<span style="color: #6633cc;">ExpenseLineAccountRefListID</span>" is found from the Account table</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Keywords: account listed</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create Journal Entries using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1618]]></link>
<guid isPermaLink="false"><![CDATA[f60bb6bb4c96d4df93c51bd69dcc15a0]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Two Examples of Creating Journal Entries 
Create a Journal Entry with 2 Credit Lines and 2 Debit Lines 
Note: This example creates one Journal Entry with two credit lines and two debit lines. Note the FQSaveToCache field, set to True except on the last ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Two Examples of Creating Journal Entries </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create a Journal Entry with 2 Credit Lines and 2 Debit Lines </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This example creates one Journal Entry with two credit lines and two debit lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span id="00ae07ca-0872-4d73-b0b6-dd4e7df6c986" class="GINGER_SOFTWARE_mark">True except</span> <span id="706a77d0-459c-4c72-9dec-57dbcdd6f594" class="GINGER_SOFTWARE_mark">on</span> the <span style="color: #ff0000;">last</span> line. Also, when saving Journal Entries, QuickBooks will reject transaction which <span id="c59ab891-a148-45ab-88dc-30a0895f9bab" class="GINGER_SOFTWARE_mark">does not balance</span> the Credit and Debit sides.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Credit Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "JournalEntryCreditLine" ("RefNumber", "JournalCreditLineAccountRefListID", "JournalCreditLineAmount", "JournalCreditLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('1', '120000-933270542', 1.11, 'Test Memo 1', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Credit Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "JournalEntryCreditLine" ("RefNumber", "JournalCreditLineAccountRefListID", "JournalCreditLineAmount", "JournalCreditLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('1', '120000-933270543', 2.22, 'Test Memo 2', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Debit Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> INSERT INTO "JournalEntryDebitLine" ("RefNumber", "JournalDebitLineAccountRefListID", "JournalDebitLineAmount", "JournalDebitLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('1', '120000-933270544', 1.11, 'Test Memo 1', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Debit Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "JournalEntryDebitLine" ("RefNumber", "JournalDebitLineAccountRefListID", "JournalDebitLineAmount", "JournalDebitLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('1', '120000-933270545', 2.22, 'Test Memo 2', <span style="color: #ff0000;">0</span>) </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create a Journal Entry with 1 Credit Line and 1 Debit Line </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: The QuickBooks sample <span id="3f4a1f7b-8c77-43e2-8803-1f6ee277f206" class="GINGER_SOFTWARE_mark">files set</span> the QuickBooks system date at Nov 15, 2021, here, so I have used these sample SQL insert statements to demonstrate using future dates in a journal entry:</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Create a Credit Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "JournalEntryCreditLine" ("TxnDate", "RefNumber",<br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="89287a5e-b84f-4f2b-baee-25200ac9afaf" class="GINGER_SOFTWARE_mark">JournalCreditLineAccountRefListID</span>", "JournalCreditLineAmount",<br />&nbsp;&nbsp;&nbsp;&nbsp; "JournalCreditLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES <br />&nbsp;&nbsp;&nbsp;&nbsp; ({d '2021-12-15'}, '1', '650002-1046372567', 1.11, <br />&nbsp;&nbsp;&nbsp;&nbsp; 'Test Future Dated Credit',&nbsp;<span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1618/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Create a Debit Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "JournalEntryDebitLine" ("TxnDate", "RefNumber",<br />&nbsp;&nbsp;&nbsp;&nbsp; "JournalDebitLineAccountRefListID", "JournalDebitLineAmount",<br />&nbsp;&nbsp;&nbsp;&nbsp; "JournalDebitLineMemo", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES <br />&nbsp;&nbsp;&nbsp;&nbsp; ({d '2021-12-15'}, '1', '650002-1046372567', 1.11, <br />&nbsp;&nbsp;&nbsp;&nbsp; 'Test Future Dated Credit',&nbsp;<span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1618/Q2.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>TxnLineIDs Locate </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT JournalCreditLineTxnLineID, JournalDebitLineTxnLineID<br />&nbsp;&nbsp;&nbsp;&nbsp; FROM JournalEntryCreditLine, JournalEntryDebitLine<br />&nbsp;&nbsp;&nbsp;&nbsp; WHERE JournalEntryCreditLine.RefNumber=JournalEntryDebitLine.RefNumber <br />&nbsp;&nbsp;&nbsp;&nbsp; and ((((JournalEntryDebitLine.TxnDate)&gt;={d'2021-12-15'})) <br />&nbsp;&nbsp;&nbsp;&nbsp; or (((JournalEntryCreditLine.TxnDate)&gt;={d'2021-12-15'})))</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1618/Q3.png" alt="" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to receive Items against a Purchase Order]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1352]]></link>
<guid isPermaLink="false"><![CDATA[8b0dc65f996f98fd178a9defd0efa077]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Receiving Items against a Purchase Order 
Note: Here, we will do a simple one-line purchase order example to understand the process.
CREATE THE PURCHASE ORDER
Query in QODBC 
&nbsp;&nbsp;&nbsp;&nbsp; The following SQL statement will crea...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Receiving Items against a Purchase Order </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Here, we will do a simple one-line purchase order example to understand the process.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE THE PURCHASE ORDER</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The following SQL statement will create a new purchase order:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "<span style="color: #ff0000;">RefNumber</span>", <br />&nbsp;&nbsp;&nbsp;&nbsp; "PurchaseOrderLineItemRefListID", "PurchaseOrderLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", <br />&nbsp;&nbsp;&nbsp;&nbsp; "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "FQSaveToCache") VALUES ('C0000-933272656', '<span style="color: #ff0000;">401</span>', '440001-1071511796', <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'standard interior door frame', 2.0, 24.00, 24.00, 'AB0000-1197756245', 0)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/POtoItemReceipt1.JPG" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Which results in the following purchase order in the QuickBooks 2006 Premier USA Edition - Sample Rock Castle Construction company file:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/potoItemReceipt3.JPG" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Receive Inventory with/without Bill Instruction </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: In QuickBooks, you have two options when Receiving Inventory:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Receive Inventory with Bill Receive Inventory without Bill as follows:</span></span></p>
<p><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/qbpo-receive.JPG" alt="" width="484" height="146" /></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE&nbsp;AN ITEM RECEIPT FROM A PURCHASE ORDER</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; When we're ready to receive the item (<span style="color: #ff0000;">without</span> a bill), we can read the Purchase Order table and insert it into the ItemReceiptItemLine table like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "ItemReceiptItemLine" ("VendorRefListID", "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp; "Memo","ItemLineItemRefListID", "ItemLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "ItemLineQuantity", "ItemLineCost", "ItemLineAmount", <br />&nbsp;&nbsp;&nbsp;&nbsp; "ItemLineCustomerRefListID","ItemLineBillableStatus","FQSaveToCache") <br />&nbsp;&nbsp;&nbsp;&nbsp; Select "VendorRefListID", {fn CONCAT('ItemReceipt ', "<span style="color: #ff0000;">RefNumber</span>")}, <br />&nbsp;&nbsp;&nbsp;&nbsp; 'Received items (bill to follow)', "PurchaseOrderLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", "PurchaseOrderLineRate", <br />&nbsp;&nbsp;&nbsp;&nbsp; "PurchaseOrderLineAmount", "PurchaseOrderLineCustomerRefListID",'Billable',<br />&nbsp;&nbsp;&nbsp;&nbsp; 0 as "FQSaveToCache" from PurchaseOrderLine <br />&nbsp;&nbsp;&nbsp;&nbsp; where "VendorRefFullName" ='Perry Windows &amp; Doors' and "<span style="color: #ff0000;">RefNumber</span>"='<span style="color: #ff0000;">401</span>'<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and "PurchaseOrderLineSeqNo"=1</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This is one complete SQL statement. For multiple purchase order lines, you would set <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">1</span> instead (using: 1 as "FQSaveToCache") and loop the PurchaseOrderLineSeqNos until the last one setting FQSaveToCache to <span style="color: #ff0000;">0</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/POtoItemReceipt2.JPG" alt="" width="572" height="398" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The Purchase Order now appears as an Item Receipt in QuickBooks but is unlinked to the Purchase Order line at this stage.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/POtoItemReceipt4.JPG" alt="" width="556" height="460" /></span></p>
<h3><span style="color: #800080; font-family: Arial, Helvetica, sans-serif;"><br /> <span style="color: #0066cc;">CREATE A LINKED ITEM RECEIPT FROM A PURCHASE ORDER</span></span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; We can also receive the item (<span style="color: #ff0000;">without</span> a bill) by reading the Purchase Order table and inserting it into the ItemReceiptItemLine table as a linked Item Receipt like this instead:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp; INSERT INTO "ItemReceiptItemLine" ("VendorRefListID", "RefNumber", <br />&nbsp;&nbsp;&nbsp; "ItemLineLinkToTxnTxnID", "ItemLineLinkToTxnTxnLineID",<br />&nbsp;&nbsp;&nbsp; "FQSaveToCache") <br />&nbsp;&nbsp;&nbsp; Select "VendorRefListID", {fn CONCAT<span style="color: #000000;">(</span><span style="color: #ff0000;">'POLink', "RefNumber"<span style="color: #000000;">)},</span></span></span> <span style="font-family: Arial, Helvetica, sans-serif;"><br />&nbsp;&nbsp;&nbsp; "TxnID", "PurchaseOrderLineTxnLineID",<br />&nbsp;&nbsp;&nbsp; 0 as "FQSaveToCache" from PurchaseOrderLine <br />&nbsp;&nbsp;&nbsp; where "VendorRefFullName" ='Perry Windows &amp; Doors' and <span style="color: #ff0000;">"</span><span style="color: #ff0000;">RefNumber"='401'</span><br />&nbsp;&nbsp;&nbsp; and "PurchaseOrderLineSeqNo"=1</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This is one complete SQL statement. For multiple purchase order lines, you would set <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">1</span> instead (using: 1 as "FQSaveToCache") and loop the PurchaseOrderLineSeqNos until the last one setting FQSaveToCache to <span style="color: #ff0000;">0</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/POtoItemReceiptA.JPG" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The Purchase Order now appears as a linked item Receipt in QuickBooks:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="http://archive.qodbc.com/oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/POtoItemReceiptB.JPG" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; And because there was only one line in the example Purchase Order, the Purchase Order has also been marked "<span style="color: #ff0000;">RECEIVED IN FULL</span>."</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/POtoItemReceiptC.JPG" alt="" width="588" height="442" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Question and Answer </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Question</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; How to receive <span style="color: #ff0000;">over</span> the PO expected quantity?</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Answer</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; If you need to receive more than the quantity ordered, you should update the PurchaseOrderLineQuantity first as below: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; UPDATE PurchaseOrderLine SET PurchaseOrderLineQuantity = 3.0 where "VendorRefFullName" ='Perry Windows &amp; Doors' and "RefNumber"='401' and "PurchaseOrderLineSeqNo"=1</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Keywords: Receive</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to insert data into the TimeTracking table using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1248]]></link>
<guid isPermaLink="false"><![CDATA[39e4973ba3321b80f37d9b55f63ed8b8]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Creating a TimeTracking Record 
Note: The following INSERT commands work on the QuickBooks 2022 USA Edition Sample Company file using QODBC v22.00.00.345 or later. Modify the essential data elements to match your system.
Create a Simple Ti...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Creating a TimeTracking Record </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: The following INSERT commands work on the QuickBooks 2022 USA Edition Sample Company file using QODBC v22.00.00.345 or later. Modify the essential data elements to match your system.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create a Simple TimeTracking </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "TimeTracking" ("<span style="color: #6600ff;">EntityRefListID</span>", "DurationMinutes","TxnDate","CustomerRefFullName","ItemServiceRefFullName", <br />"PayrollItemWageRefFullName") VALUES ( '<span style="color: #6600ff;">60001-1039046236</span>', 480, {d'2021-12-15'}, 'Kim Garland', 'Installation Labor','Sick -Salary')</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create a TimeTracking with Long Notes </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong> &nbsp;&nbsp;&nbsp;&nbsp; </strong>This INSERT statement is a Time/Enter Single Activity entry with a very long "Notes" column/field with QuickBooks 2022 :</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "TimeTracking" ("<span style="color: #6600ff;">EntityRefListID</span>", "DurationMinutes","TxnDate","CustomerRefFullName","ItemServiceRefFullName", <br />"PayrollItemWageRefFullName","<span style="color: #0000ff;">Notes</span>") VALUES ( '<span style="color: #6600ff;">60001-1039046236</span>', 480, {d'2021-12-15'}, 'Kim Garland', 'Installation Labor','Sick -Salary','<span style="color: #0000ff;">QODBC is a fully functional ODBC driver for reading and writing QuickBooks 2022-2002 accounting data files by using standard SQL queries. It requires an ODBC-compliant front-end application such as Microsoft Word, Microsoft Excel, Microsoft Access, Visual Basic, PowerBuilder, Delphi, Python, C#, .NET, ASP, ASP.NET, PHP, Crystal Reports, Jitterbit, QlikView, Power BI, and many popular report writers and tools. Once installed, it will allow these applications to read and write QuickBooks Accounting files in the same fashion as other file formats installed on your computer. Using the official QuickBooks SDK interface, we can offer our customers total compatibility with all QuickBooks file formats.</span>' )<br /> <br /> <strong>Note</strong>: The "Notes" column has a limit of 4095 characters, and the text cannot contain any (commas).</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QODBC Test Tool</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1248/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The screen dump (below) shows the Time/Enter Single Activity entry with a very long "Notes" column/field as it appears in QuickBooks 2022 after executing the SQL statement:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1248/Q2.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Data Location</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>EntityRefListID Location </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; I used the "<span style="color: #6600ff;">EntityRefListID</span>" value of '<span style="color: #6600ff;">60001-1039046236</span>' because it's the ListID for employee Dan T. Miller. <span style="color: #6600ff;">EntityRefListID</span>&nbsp;can be found in the Entity table by doing the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT ListID, FullName, IsActive, Type FROM Entity</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; or, in my case to check that '<span style="color: #6600ff;">60001-1039046236</span>' is a valid "<span style="color: #6600ff;">EntityRefListID</span>":</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT ListID, FullName, IsActive, Type FROM Entity where <span style="color: #6600ff;">ListID</span>='<span style="color: #6600ff;">60001-1039046236</span>'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1248/Q3.png" alt="" /></span></p>
<p style="text-align: left;">&nbsp;</p>
<p style="text-align: left;"><span style="font-family: Arial, Helvetica, sans-serif;">Keywords: Tracking</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create a Purchase Order using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1138]]></link>
<guid isPermaLink="false"><![CDATA[c3e0c62ee91db8dc7382bde7419bb573]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of creating a PurchaseOrder 
Note: This example creates one PurchaseOrder with three lines. Note the FQSaveToCache field, set to TRUE (1) except on the last line.
First Line 
&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "PurchaseOrderLine" ("VendorRefL...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of creating a <span id="b43c950d-c943-4fe5-82f3-22e1787dc1bd" class="GINGER_SOFTWARE_mark">PurchaseOrder</span> </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This example creates one <span id="42fb6e26-e234-435a-b1b5-ce799e2a49af" class="GINGER_SOFTWARE_mark">PurchaseOrder</span> with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to TRUE (1) except <span id="7b1f517b-bd1e-41e0-8549-ca6941c1006b" class="GINGER_SOFTWARE_mark">on</span> the <span style="color: #ff0000;">last</span> line.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">First Line </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "PurchaseOrderLine" ("<span style="color: #0000ff;">VendorRefListID</span>", "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #990000;"><span id="d30572bb-28e3-4abd-a05f-c0df28f95483" class="GINGER_SOFTWARE_mark">PurchaseOrderLineItemRefListID</span></span>", "PurchaseOrderLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="59dfacfc-59f2-451c-bfc6-6506fd69ad79" class="GINGER_SOFTWARE_mark">PurchaseOrderLineQuantity</span>", "PurchaseOrderLineRate", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="660f10da-f68e-4ec5-a7be-57160700a240" class="GINGER_SOFTWARE_mark">PurchaseOrderLineAmount</span>", "<span style="color: #6600ff;">PurchaseOrderLineCustomerRefListID</span>", <br /> <span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp; "</span><span style="color: #ff0000;"><span id="49c0afc5-eeed-45b6-8430-ea066c8ee6bf" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span><span style="color: #cc0000;"><span style="color: #000000;">")</span></span> VALUES ('<span style="color: #0000ff;">390000-1039739488</span>', '1', '<span style="color: #990000;">670004-1044572237</span>', <br />&nbsp;&nbsp;&nbsp;&nbsp; 'See Attached 1', 1.0, 1.0, 1.11, '<span style="color: #6600ff;">4C0000-1040154668</span>', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1138/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used to test QODBC SQL queries only and is not a development tool.</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Second Line </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("<span style="color: #0000ff;">VendorRefListID</span>", "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #990000;"><span id="67011780-f4a9-4b66-a356-941c1c24e9c8" class="GINGER_SOFTWARE_mark">PurchaseOrderLineItemRefListID</span></span>", "PurchaseOrderLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="a242517d-de9f-49c2-8715-3be4deaf8e31" class="GINGER_SOFTWARE_mark">PurchaseOrderLineQuantity</span>", "PurchaseOrderLineRate", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="34e27f00-29a1-47e6-a068-8fc58be80252" class="GINGER_SOFTWARE_mark">PurchaseOrderLineAmount</span>", "<span style="color: #6600ff;">PurchaseOrderLineCustomerRefListID</span>", <br /> <span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp; "</span><span style="color: #ff0000;"><span id="92f37908-50ec-44f1-9ee8-fd43536ad0b4" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span><span style="color: #cc0000;"><span style="color: #000000;">")</span></span> VALUES ('<span style="color: #0000ff;">390000-1039739488</span>', '1', '<span style="color: #990000;">670004-1044572237</span>', <br />&nbsp;&nbsp;&nbsp;&nbsp; 'See Attached 2', 2.0, 2.0, 2.22, '<span style="color: #6600ff;">4C0000-1040154668</span>', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1138/Q2.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Third (Last) Line</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; </span><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("<span style="color: #0000ff;">VendorRefListID</span>", "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #990000;"><span id="d2376ee8-ab50-45e2-a84c-38a6030d192c" class="GINGER_SOFTWARE_mark">PurchaseOrderLineItemRefListID</span></span>", "PurchaseOrderLineDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="76ced588-7695-4604-88c6-6f9ca76cf1d0" class="GINGER_SOFTWARE_mark">PurchaseOrderLineQuantity</span>", "PurchaseOrderLineRate", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="37728ad5-db97-4243-8663-0f84b4e16da1" class="GINGER_SOFTWARE_mark">PurchaseOrderLineAmount</span>", "<span style="color: #6600ff;">PurchaseOrderLineCustomerRefListID</span>", <br /> <span style="color: #000000;">&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;"><span id="dab9c2de-8788-44e3-9756-9f4fac9235ba" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>")</span> VALUES ('<span style="color: #0000ff;">390000-1039739488</span>', '1', '<span style="color: #990000;">670004-1044572237</span>', <br />&nbsp;&nbsp;&nbsp;&nbsp; 'See Attached 3', 3.0, 3.0, 3.33, '<span style="color: #6600ff;">4C0000-1040154668</span>', <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1138/Q3.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Results in QuickBooks </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; This results in the following Purchase Order being created by QODBC using the QuickBooks 2022 Enterprise USA Edition and the Sample company file as an example:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1138/Q4.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Related Data Description</span></h3>
<p><span style="color: #0000ff; font-family: Arial, Helvetica, sans-serif;">VendorRefListID</span><span style="font-family: Arial, Helvetica, sans-serif;"> is the ListID for the Vendor found by doing : </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Select * from Vendor</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;">PurchaseOrderLineItemRefListID</span><span style="font-family: Arial, Helvetica, sans-serif;"> is the existing Inventory Item ListID found by using: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong> &nbsp;&nbsp;&nbsp; </strong>Select ListID, FullName, Description, Type FROM Item</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #6600ff;">PurchaseOrderLineCustomerRefListID</span> is the ListID for the customer found by doing : </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Select * from Customer</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note:</strong> If you want to create Purchase Order without using CustomerRefListID, then you can remove it from your query because it is optional. Please refer below sample query:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",&nbsp;"<span id="d30572bb-28e3-4abd-a05f-c0df28f95483" class="GINGER_SOFTWARE_mark">PurchaseOrderLineItemRefListID</span>", "PurchaseOrderLineDesc",&nbsp;"<span id="59dfacfc-59f2-451c-bfc6-6506fd69ad79" class="GINGER_SOFTWARE_mark">PurchaseOrderLineQuantity</span>", "PurchaseOrderLineRate",&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="660f10da-f68e-4ec5-a7be-57160700a240" class="GINGER_SOFTWARE_mark">PurchaseOrderLineAmount</span>",&nbsp;"<span id="49c0afc5-eeed-45b6-8430-ea066c8ee6bf" class="GINGER_SOFTWARE_mark">FQSaveToCache</span>")&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;">VALUES&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;">('</span><span style="font-family: Arial, Helvetica, sans-serif;">10000-933272655</span><span style="font-family: Arial, Helvetica, sans-serif;">', '1', '</span><span style="font-family: Arial, Helvetica, sans-serif;">250000-933272656</span><span style="font-family: Arial, Helvetica, sans-serif;">',&nbsp;</span><span style="font-family: Arial, Helvetica, sans-serif;">'See Attached 1', 1.0, 1.0, 1.11,0</span><span style="font-family: Arial, Helvetica, sans-serif;">)</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Insert into PurchaseOrder with All Shared Header Information</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: The FQSaveToCache field, set to <strong>True</strong> on all the PurchaseOrderLines. Saving the Purchase Order header saves the lines with it. Here is an example that creates one Purchase Order with three lines. </span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", <br />"PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", <br />"PurchaseOrderLineRate", "PurchaseOrderLineAmount", <br />"PurchaseOrderLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES <br />('250000-933272656', 'See Attached 1', 1.0, 1.0, 1.11, '580000-1071526281', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", <br />"PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", <br />"PurchaseOrderLineRate", "PurchaseOrderLineAmount", <br />"PurchaseOrderLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES <br />('250000-933272656', 'See Attached 2', 2.0, 2.0, 2.22, '580000-1071526281', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "PurchaseOrderLine" ("PurchaseOrderLineItemRefListID", <br />"PurchaseOrderLineDesc", "PurchaseOrderLineQuantity", <br />"PurchaseOrderLineRate", "PurchaseOrderLineAmount", <br />"PurchaseOrderLineCustomerRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES <br />('250000-9332 72656', 'See Attached 3', 3.0, 3.0, 3.33, '580000-1071526281', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Shared Header Information </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<span style="color: #ff0000;">PurchaseOrder</span>" ("VendorRefListID", "RefNumber", "Memo", <br />"IsToBePrinted") VALUES ('10000-933272655', '1', 'Memo Test', <span style="color: #000000;">0</span>)</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to add an Inventory Item using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/1135]]></link>
<guid isPermaLink="false"><![CDATA[fd2c5e4680d9a01dba3aada5ece22270]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Example of Add an Inventory Item 
Note: This is an example of how to add an ItemInventory Item. You can also use the stored procedure "sp_lastinsertid ItemInventory" immediately after the insert statement to retrieve a record set&nbsp;with the ListID of ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Add an Inventory Item </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This is an example of how to add an ItemInventory Item. You can also use the stored procedure "<span style="color: #0000ff;">sp_lastinsertid ItemInventory</span>" immediately after the insert statement to retrieve a record set&nbsp;with the <span id="67dac941-ebe9-418e-9ba5-6b7bfe41c2f0" class="GINGER_SOFTWARE_mark"><span id="d7d1df39-1267-4c91-9b7e-8bb7604b6dbc" class="GINGER_SOFTWARE_mark">ListID</span></span> of the new item you just inserted.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Query in QODBC </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ItemInventory ("<span style="color: #990000;">Name</span>", "IsActive", "SalesDesc", "SalesPrice", "IncomeAccountRefListID", "PurchaseDesc", "PurchaseCost", "COGSAccountRefListID", "PrefVendorRefListID", "AssetAccountRefListID", "ReorderPoint", "QuantityOnHand", "TotalValue", "InventoryDate") VALUES ('<span style="color: #990000;">NewItemInventory</span>', TRUE, 'SalesNew', 0.0013, 650002-1046372567', 'PurchaseNew', 0.005, '630003-1046215073', '390000-1039739488', '5A0002-1044562956', 25.0, 50.0, 10.0, {d'2021-12-15'})</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1135/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p><strong>Updating Inventory &nbsp;<strong>Item</strong></strong></p>
<p><span id="fc34ff12-13d9-4f77-a830-e814bf20a9ab" class="GINGER_SOFTWARE_mark">update</span>&nbsp;&nbsp;ItemInventory set PurchaseDesc='Here are my details on&nbsp;<span id="707eed52-71e6-40c4-9ad4-73e9772f8f0e" class="GINGER_SOFTWARE_mark">purchase</span>', salesdesc='Sales description goes here' where FullName='Air Conditioning.'</p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The above&nbsp;<span id="8702a0e2-c253-4cb2-8eff-3cbe07a11b28" class="GINGER_SOFTWARE_mark"><span id="a1411ea0-b4d3-4319-b452-5518a65fb2c6" class="GINGER_SOFTWARE_mark">queries</span></span> result in this in the USA Sample <span id="afa00051-872c-4a10-9fcf-dc3dc1a8c038" class="GINGER_SOFTWARE_mark"><span id="8439101b-dc13-4dc1-80c4-9acceb2475ae" class="GINGER_SOFTWARE_mark"></span></span> company file in QuickBooks 2022:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1135/Q2.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Notes</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Unique Item FullName</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Before you add any new Inventory Items, you should check the <strong>ITEM</strong> table first to see if the new Inventory Item <span style="color: #990000;">Name </span>is not already used in QuickBooks. The ITEM table is a combined list of all Item tables in QuickBooks as below:<span id="d7fd90a4-1b9f-4cb4-b2bc-d594a0efa437" class="GINGER_SOFTWARE_mark"><span id="9e20a313-7f14-4e7a-8ead-c70a2c8b0647" class="GINGER_SOFTWARE_mark"></span></span> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; <span id="c773ea3f-dacb-476d-83d5-e93d20d5ea3d" class="GINGER_SOFTWARE_mark"><span id="7627c213-a26d-4e51-b34f-9d77cd974f80" class="GINGER_SOFTWARE_mark">ItemInventory</span></span>, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, <span id="5beee4d9-fd2a-4b33-bf8b-0d46e2b1fb29" class="GINGER_SOFTWARE_mark"><span id="2e8ff3a7-def4-435b-ba10-b3ffe95771c6" class="GINGER_SOFTWARE_mark">ItemService</span></span>, ItemFixedAsset, and ItemGroup </span><span style="font-family: Arial, Helvetica, sans-serif;">(with minimum standard fields)<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; When inserting a new ItemInventory item, the <span style="color: #990000;">Name</span> can't already be, for example, an ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, <span id="e0e43bef-6f29-4b63-b3ee-5294df925bc9" class="GINGER_SOFTWARE_mark"><span id="1da8d470-b684-4d49-966e-7f032257f099" class="GINGER_SOFTWARE_mark">ItemService</span></span>, ItemFixedAsset, or ItemGroup <span id="9e52ad53-e9e1-42df-80bc-31536e70b5ff" class="GINGER_SOFTWARE_mark"><span id="86dc1175-6840-46ad-8b4b-69549166d34c" class="GINGER_SOFTWARE_mark">FullName</span></span>. It must be a <strong>unique</strong> new ITEM FullName!</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Locate Item FullName </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; To see the complete item<span id="260e1b34-e87c-48ad-94db-80052da8d045" class="GINGER_SOFTWARE_mark"><span id="5d1b7066-6bfe-4782-af51-5e89ad113b8b" class="GINGER_SOFTWARE_mark">&nbsp;names</span></span>, you can run the following query in QODBC Support Wizard:<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; SELECT <span id="ec9256bb-0fce-4603-9240-067002cd58f6" class="GINGER_SOFTWARE_mark"><span id="1a72bf2d-51cb-4595-9daa-a1ea4d553f53" class="GINGER_SOFTWARE_mark">ListID</span></span>, FullName, Description, Type FROM Item<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; In my case, my USA QuickBooks 2022 sample file returned the following items:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/1135/Q3.png" alt="" border="0" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Entity Table Reference</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; And like ITEM, there's <span id="ba13664d-206e-4f9c-8213-e043c34ca775" class="GINGER_SOFTWARE_mark">an</span> ENTITY table that's the combined list of all entity tables in QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Customers, Employees, other names, and Vendors (with minimum standard fields)<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So when inserting a new Customer name, the <span id="7dd34b0c-1dc6-4497-b7d9-10489d57ddb1" class="GINGER_SOFTWARE_mark">FullName</span> can't be, for example, a Customer, Employee, OtherName, or Vendor already. It must be a unique new ENTITY FullName in QuickBooks!</span></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Apply a Refund Check Using the QODBC Driver]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/994]]></link>
<guid isPermaLink="false"><![CDATA[934815ad542a4a7c5e8a2dfa04fea9f5]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[[QODBC-Desktop] How to Apply a Refund Check Using the QODBC Driver
Applying a refund check to an existing credit memo
Apply Refund Check in QuickBooks
You cannot use QODBC to create refund checks applied to credit memos. To do this, open the Create Cre...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">[QODBC-Desktop] How to Apply a Refund Check Using the QODBC Driver</span></h2>
<h3><strong><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Applying a refund check to an existing credit memo</span></strong></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Apply Refund Check in QuickBooks</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">You cannot use QODBC to create refund checks applied to credit memos. To do this, open the Create Credit Memos/Refunds dialog box using the QuickBooks UI and find the credit memo for that customer. In the dialog box icon bar, click on the dollar bill with a hand above it and choose "Give Refund." </span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/givearefund.JPG" alt="" width="598" height="470" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Instructions</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">For existing Credit Memos, we can use the Credit Memo TxnID and apply it in the AppliedToTxnSetCreditCreditTxnID column in the&nbsp;ReceivePaymentLine insert for payments, but not for refunds. The CreditMemoLinkedTxn table is updated automatically by QuickBooks and cannot be used by QODBC to create linked refund transactions at this stage.</span></p>
<p>&nbsp;</p>
<h3><strong><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Overpayments and Refunds using QODBC Driver</span></strong></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">QODBC build 259 (or higher) supports OverPayments and Refunds. See below as an example: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #993300;">Create an Invoice for a Customer </span></strong><br />INSERT INTO InvoiceLine (CustomerRefFullName, ARAccountRefFullName, InvoiceLineItemRefFullName, InvoiceLineAmount) VALUES ('Pretell Real Estate:155 Wilks Blvd.', 'Accounts Receivable', 'Framing', 1000.00) <br /> <br /> <span style="color: #990000;"><strong>Get the TxnID of the Invoice </strong></span><br />sp_lastinsertID Invoice (returns '48FB-1197746739')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Receive the check that includes overpayment to just the invoice </span></strong><br />INSERT INTO ReceivePaymentLine (CustomerRefFullName, ARAccountRefFullName, TotalAmount, PaymentMethodRefFullName, DepositToAccountRefFullName, AppliedToTxnTxnID, AppliedToTxnPaymentAmount) VALUES ('Pretell Real Estate:155 Wilks Blvd.', 'Accounts Receivable', 1100.00, 'Check', 'Checking', '48FB-1197746739', 1000.00) <br /> <br /> <span style="color: #990000;"><strong>Get the TxnID from the ReceivePayment</strong></span><br />sp_lastinsertID ReceivePayment (returns '48FF-1197747551') <br /> <br /> <span style="color: #990000;"><strong>To see what it looks like </strong></span><br />SELECT * FROM ReceivePaymentLine where TxnID = '48FF-1197747551'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Print a refund check (It can be an ARRefundCreditCard, you need the TxnID from it) </span></strong><br />INSERT INTO CheckExpenseLine (AccountRefFullName, PayeeEntityRefFullName, ExpenseLineAccountRefFullName, ExpenseLineAmount, ExpenseLineCustomerRefFullName) VALUES ('Checking', 'Pretell Real Estate:155 Wilks Blvd.', 'Accounts Receivable', 100.00, 'Pretell Real Estate:155 Wilks Blvd.') <br /> <br /> <span style="color: #990000;"><strong>Get the TxnID from the Check </strong></span><br />sp_lastinsertID Check (returns '4904-1197749043')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Now attach the overpayment to the original payment that was overpaid </span></strong><br /> <strong>Note</strong>: This is the guts of it, being able to edit the payment and connect it to the correct pieces. <br />INSERT INTO ReceivePaymentLine (TxnID, AppliedToTxnTxnID, AppliedToTxnPaymentAmount) VALUES ('48FF-1197747551', '4904-1197749043', 100.00)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">To see what it looks like </span></strong><br />SELECT * FROM ReceivePaymentLine where TxnID = '48FF-1197747551'</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to create a Sales Receipt using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/920]]></link>
<guid isPermaLink="false"><![CDATA[6d0f846348a856321729a2f36734d1a7]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Example of Creating Sales Receipts for USA QuickBooks Users 
Create One Sales Receipt with a Single Line 
Note: This creates one SalesReceipt with a single line with all the billing address details.
Query in QODBC 
insert into salesreceiptline (Custom...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating Sales Receipts for USA QuickBooks Users </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Sales Receipt with a Single Line </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates <span style="color: #000000;">one</span> <span id="7cc49469-dad7-4a69-bd76-e918f30325bb" class="GINGER_SOFTWARE_mark">SalesReceipt</span> with a single line with all the billing address details.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="dbdd6a55-b02b-4ebc-9c49-c74d871873df" class="GINGER_SOFTWARE_mark">insert</span> into <strong><span id="f9c598f7-88f5-4168-bd9e-c3fbd02084d1" class="GINGER_SOFTWARE_mark">salesreceiptline</span></strong> (CustomerRefListID, TemplateRefListID, TxnDate, <br />IsPending, DueDate, IsToBePrinted, DepositToAccountRefListID,<br />BillAddressAddr1, BillAddressAddr2, BillAddressAddr3, <br />BillAddressCity, BillAddressState, BillAddressPostalCode,<br />SalesReceiptLineItemRefListID, SalesReceiptLineDesc, <br />SalesReceiptLineRate, SalesReceiptLineAmount,<br />SalesReceiptLineSalesTaxCodeRefListID)<br />values ('4C0000-1040154668', '80000-910479423', {d'2021-12-15'}, 'ABC01',<br />0, {d'2021-12-15'}, 0, '30000-896814907','Joe Mama Inc 2', <br />'123 Main St.', 'Suite 450', 'Chicago', 'IL', '60602', <br />'8C0003-1044564690', 'Priority Support Incident 10 Pack Subscription', <br />275.00, 275.00, '20000-1011136881')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The query above results in the following Sales Receipt in QuickBooks 2022 Enterprise:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q2.png" alt="" /></span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Creating Sales Receipts for NON-USA QuickBooks Users </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Sales Receipt with Three Lines </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates <span style="color: #000000;">one</span> SalesReceipt with three lines. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to True except on the <span style="color: #ff0000;">last</span> line.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("CustomerRefListID", "RefNumber", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("CustomerRefListID", "RefNumber", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third (Last) Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("CustomerRefListID", "RefNumber", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286', <span style="color: #ff0000;">0</span>)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create Three Sales Receipts with One Line in Each </span></h3>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates three SalesReceipts with one line each. Note the <span style="color: #ff0000;">FQSaveToCache</span> field is not specified (or can be set to <span style="color: #ff0000;">false</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First SalesReceipt </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("CustomerRefListID", "RefNumber", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286')</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second SalesReceipt </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("CustomerRefListID", "RefNumber", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286')</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third SalesReceipt </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("CustomerRefListID", "RefNumber", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID") VALUES ('470001-1071525403', '1', '250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286')</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create One Sales Receipt with Three Lines with Shared Header Information </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This creates <span style="color: #000000;">one</span> SalesReceipt with three lines with a specified billing address. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span style="color: #ff0000;">True</span>. Saving the SalesReceipt saves the lines with it.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 1', 1.00000, 1.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 2', 2.00000, 2.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('250000-933272656', 'Building permit 3', 3.00000, 3.00, '20000-999022286', <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Shared Header Information</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceipt</strong>" ("CustomerRefListID", "TxnDate", "RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", "BillAddressCounty", "BillAddressPostalCode", "BillAddressCountry", "IsPending", "DueDate", "ShipDate", "ItemSalesTaxRefListID", "Memo", "IsToBePrinted", "CustomerTaxCodeRefListID") VALUES ('470001-1071525403', {d'2021-10-01'}, '1', 'Brad Lamb', '1921 Appleseed Lane', 'Bayshore', 'CA', '94326', 'USA', 0, {d'2021-10-31'}, {d'2021-10-01'}, '2E0000-933272656', 'Memo Test', 0, '10000-999022286')</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Special Instructions about Add Lines to a Single Line Sales Receipt </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FileMaker Pro and some other products connect to and disconnect from QODBC after running every SQL statement, so it's impossible to do multiple Sales Receipt lines using our standard <strong>FQSaveToCache</strong> method. Where this is the case, you will have to use Plan B to create a single-line Sales Receipt and add additional lines to it afterward, as per the following example.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create a New Line SalesReceipt </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("CustomerRefListID", "<span style="color: #0000ff;">RefNumber</span>", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineSalesTaxCodeRefListID", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('460000-1040154385', '<span style="color: #0000ff;">XYZ01</span>', '8C0003-1044564690', 'Building permit 1', 1.00000, 1.00, '20000-1011136881', <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q3.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Locate the TxnID of the Sales Receipt </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We can add two new lines to the SalesReceipt using the <strong>TxnID</strong> of the SalesReceipt we just created. The TxnID is found by searching the SalesReceiptLine table for the SalesReceipt by doing the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select <span style="color: #ff0000;">TxnID</span>, TxnDate, RefNumber, CustomerRefFullName from SalesReceiptLine <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where CustomerRefListID='460000-1040154385' and <span style="color: #0000ff;">RefNumber </span>= <span style="color: #000000;">'<span style="color: #0000ff;">XYZ01</span>'</span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Where 1 is the RefNumber for the Sales Receipt, we just created.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q4.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Add Two New Lines to the Existing SalesReceipt</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">First Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("<span style="color: #ff0000;">TxnID</span>", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineSalesTaxCodeRefListID") <br /> <span style="color: #000000;">VALUES ('<span style="color: #ff0000;">8BFF-1481801824</span>', '8B0001-1044564368', 'Building permit 2', 2.00000, 2.00, '20000-1011136881')</span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q5.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>SalesReceiptLine</strong>" ("<span style="color: #ff0000;">TxnID</span>", "SalesReceiptLineItemRefListID", "SalesReceiptLineDesc", "SalesReceiptLineRate", "SalesReceiptLineAmount", "SalesReceiptLineSalesTaxCodeRefListID") <br /> <span style="color: #000000;">VALUES ('<span style="color: #ff0000;">8BFF-1481801824</span>', '520004-1044568031', 'Building permit 3', 3.00000, 3.00, '20000-1011136881')</span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q6.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We now have the following Sales Receipt with three lines in QuickBooks:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q7.png" alt="" /></span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Sum all Sales Receipts for a Selected Date Range</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Query in QODBC </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT SalesReceiptLine.CustomerRefFullName, <span style="color: #0000ff;">Sum(SalesReceiptLine.TotalAmount) AS SumOfTotalAmount</span><br />FROM <strong>SalesReceiptLine</strong> unoptimized<br />WHERE (((SalesReceiptLine.TxnDate)&gt;={d'2021-12-01'})) and (((SalesReceiptLine.TxnDate)&lt;{d'2021-12-31'}))<br />GROUP BY SalesReceiptLine.CustomerRefFullName</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/920/Q8.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">And change the greater than or equal (&gt;=) and the less than (&lt;) dates to the date range you wish to use.</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to insert data into ItemService using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/787]]></link>
<guid isPermaLink="false"><![CDATA[3621f1454cacf995530ea53652ddf8fb]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[Example of Create an ItemService Item 
Note: VB Demo is deprecated. 
Please refer to How to use the QODBC Test Tool for testing 
Note: This is an example of how to add a new ItemService Item.&nbsp;You can also use the stored procedure "sp_lastinsertid ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Example of Create an <span id="6d7cc859-e2a7-4527-bc21-17b4eac939f5" class="GINGER_SOFTWARE_mark">ItemService</span> Item </span></h2>
<h5><span style="color: #cc0000; font-family: Arial,Helvetica,sans-serif;">Note: VB Demo is deprecated. </span></h5>
<p>Please refer to <a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3069/" target="_blank">How to use the QODBC Test Tool for testing </a></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: This is an example of how to add a new <strong><span style="color: #000000;"><span id="15b634d1-d633-4518-925f-0518ca3685ed" class="GINGER_SOFTWARE_mark">ItemService</span></span></strong> Item<span id="a85f1da6-5a0d-4e39-a9e4-d93c6b412f30" class="GINGER_SOFTWARE_mark">.&nbsp;</span>You can also use the stored procedure "sp_lastinsertid <span id="c8fe5867-fc12-4c2e-8f4a-6ccb1e9fa7f4" class="GINGER_SOFTWARE_mark">ItemService</span>" immediately after the insert statement to retrieve a record set&nbsp;that has the <span id="2cdb020e-53ab-4278-8ec6-c2f92977d0fc" class="GINGER_SOFTWARE_mark">ListID</span> <span id="876630c5-6c15-4f07-ba1f-997f250b06ab" class="GINGER_SOFTWARE_mark">of</span> the new service item you just inserted.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Query in QODBC </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO <strong><span style="color: #000000;"><span id="b7c022b5-a1bf-46c6-8d81-542fbe4814b7" class="GINGER_SOFTWARE_mark">ItemService</span></span></strong> <br />&nbsp;&nbsp;&nbsp;&nbsp; ("<span style="color: #0000ff;">Name</span>", "IsActive", "SalesORPurchaseDesc", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span id="e2dbcf3e-fedb-485f-aa0a-0f08e0d17faf" class="GINGER_SOFTWARE_mark">SalesTaxCodeRefListID</span>", "SalesOrPurchasePrice", "SalesOrPurchaseAccountRefListID") <br />&nbsp;&nbsp;&nbsp;&nbsp; VALUES <br />&nbsp;&nbsp;&nbsp;&nbsp; ('<span style="color: #0000ff;">Priority Support</span>', TRUE, 'QODBC Priority Support Incident', <br />&nbsp;&nbsp;&nbsp;&nbsp; '10000-1011136881', 33.00, '20000-896814722')</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/787/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used to test QODBC SQL queries only and is not a development tool.</p>
<h3>&nbsp;</h3>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Result in QuickBooks </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Once the statement above is executed, the following new Service appeared in QuickBooks 2006:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/787/Q2.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Unique Item Name </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; But before you add any new Service Items, you should check the <strong>ITEM</strong> table first to see if the new Service Item <span style="color: #0000ff;">Name </span>is not already used in QuickBooks. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; The ITEM table is a combined list of all Item <span id="43a8bb33-5dc7-4dc6-8113-ab17b2193410" class="GINGER_SOFTWARE_mark">tables in</span> QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, and ItemGroup (with minimum common fields)<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; When inserting a new <strong><span style="color: #000000;">ItemService</span></strong> item, the <span style="color: #0000ff;">Name</span> can't already be, for example, an ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, or ItemGroup FullName already. It must be a unique new ITEM FullName!</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Locate Item FullName </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; To see the item FullName, you can run the following query in VB Demo:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; SELECT ListID, FullName, Description, Type FROM Item</span><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; In my case, QuickBooks 2022 USA sample file returned the following items:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/787/Q3.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">ENTITY Table Related </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; And like ITEM, there's an ENTITY table that's the combined list of all entity tables in QuickBooks: </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Customers, Employees, Other names, and Vendors (with minimum common fields)<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp; So when inserting a new Customer name, the FullName can't be, for example, a Customer, Employee, Other names, or Vendor already. It must be a unique new ENTITY FullName in QuickBooks!</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Invoice ItemGroups using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/504]]></link>
<guid isPermaLink="false"><![CDATA[b337e84de8752b27eda3a12363109e80]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Invoice Item Groups
Create an ItemGroup with Three Lines 
Note: Let's create a new item group example with three lines using QODBC. Note the FQSaveToCache field, set to True except on the last one.
First Line 
INSERT INTO "ItemGroupLine"...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Invoice Item Groups</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create an ItemGroup with Three Lines </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Note: Let's create a new <span id="a200f460-62ee-4a81-83f2-06ebe869415b" class="GINGER_SOFTWARE_mark">item group</span> <span id="7e475cf2-f41f-4383-aa02-30b2f2361276" class="GINGER_SOFTWARE_mark">example with</span> three lines using QODBC. Note the <span style="color: #ff0000;">FQSaveToCache</span> field, set to <span id="025ca6af-16a8-43f7-87f0-ef0b28345310" class="GINGER_SOFTWARE_mark">True except</span> <span id="33404719-03d0-4312-ae4e-e410b0fb020d" class="GINGER_SOFTWARE_mark">on</span> the <span style="color: #ff0000;">last</span> one.</span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">First Line </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 1', 1, 'Test Item Desc', 1, '670004-1044572237', 1.0, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q1.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 2', 1, 'Test Item Desc', 1, '6D0003-1044572301', 2.0, <span style="color: #ff0000;">1</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q2.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Third (Last) Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>ItemGroupLine</strong>" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "<span style="color: #ff0000;">FQSaveToCache</span>") VALUES ('Test1 W3 Lines 3', 1, 'Test Item Desc', 1, '500004-1044567946', 3.0, <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q3.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The result looks like this in QuickBooks 2022:</span></p>
<p>&nbsp;</p>
<div>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q4.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">For more about creating ItemGroups, please see: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2172" target="_blank">How to generate Item Groups using QODBC</a>.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Locate the List ID of the New ItemGroup</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">To locate the ListID of the new Item Group (or any group), do: </span></p>
</div>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT ListID, Name, ItemDesc, IsActive FROM ItemGroup</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q5.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Invoice the ItemGroup </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: We can now invoice the item group using the ListID:<span style="color: #003366;">'<span style="color: #0000ff;">80000091-1481802639</span>'</span> and make one simple QODBC insert statement below. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>InvoiceLine</strong>" ("CustomerRefListID", "RefNumber", <br />"<span style="color: #0000ff;">InvoiceLineGroupItemGroupRefListID</span>","<span style="color: #ff0000;">FQSaveToCache</span>") <br />VALUES ('10002-1048342233', 'Group2', <span style="color: #003366;">'<span style="color: #0000ff;">80000091-1481802639</span>'</span>, <span style="color: #ff0000;">0</span>)</span></p>
<p><img src="https://support.flexquarters.com/esupport/newimages/504/Q6.png" alt="" /></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong><span style="color: #990000;">Result in QuickBooks </span></strong></span></p>
<p>When we look at the new Invoice in QuickBooks 2022, we will see the following:</p>
<p><img src="https://support.flexquarters.com/esupport/newimages/504/Q07.png" alt="" /></p>
<p>&nbsp;</p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>:</span><span style="font-family: Arial, Helvetica, sans-serif;"> The Qty, Rate, and Amount are shown as 0 for Floor Plans and Concrete Slab, not because QODBC made a mistake. You need to correct the rate of the service or stock item:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q8.png" alt="" /></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Add Additional Lines to the Invoice </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: You can add additional lines to the Invoice later by locating the TxnID for the Invoice by using (for example) below. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> SELECT Top 10 TxnID, RefNumber, CustomerRefFullName FROM Invoice ORDER BY TimeCreated DESC</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q9.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">To get the TxnID of the Invoice that you inserted earlier, and then add new normal line items after the group by doing, for example:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "<strong>InvoiceLine</strong>" ("<span style="color: #0000ff;">TxnID</span>", "InvoiceLineItemRefListID", "InvoiceLineDesc", <br />"InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID") <br />VALUES ('<span style="color: #0000ff;">8BF1-1481803738</span>', '80000091-1481802639', 'Test Add a Line', <br />1.00000, 1.00, '20000-1011136881')</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/504/Q11.png" alt="" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] What can I do with Employee Earnings (EmployeeEarning)?]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/415]]></link>
<guid isPermaLink="false"><![CDATA[42e7aaa88b48137a16a1acd04ed91125]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[EmployeeEarning INSERT
Create a new Employee and EmployeeEarning Line
INSERT INTO EmployeeEarning (FirstName, MiddleName, LastName, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate, FQSaveToCache) VALUES ('Tom','T.','QODBC', '10000-9...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">EmployeeEarning INSERT</span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Create a new Employee and EmployeeEarning Line</span></h3>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">INSERT INTO EmployeeEarning (FirstName, MiddleName, LastName, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate, FQSaveToCache) VALUES ('Tom','T.','QODBC', '10000-933272656', 30000.0, 0)</span></p>
<h3><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #0066cc;">Create a new EmployeeEarning Line for an Existing Employee</span></span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #000000;">INSERT INTO EmployeeEarning (ListID, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate) VALUES ('300000-934380930', '20000-934380928', 40000)</span></span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">EmployeeEarning UPDATE </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">UPDATE "EmployeeEarning" SET PayrollInfoEarningsRate = 25000.0 WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '10000-933272656'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">UPDATE "EmployeeEarning" SET PayrollInfoEarningsRate = 20.000 WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '50000-933272657'</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">EmployeeEarning DELETE </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">DELETE FROM "EmployeeEarning" WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '10000-933272656'<br /> <br />DELETE FROM "EmployeeEarning" WHERE "ListID" = '390000-933272659' AND "PayrollInfoEarningsPayrollItemWageRefListID" = '50000-933272657'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: You MUST specify PayrollInfoEarningsPayrollItemWageRefListID in the delete as the example. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you run the query as per: DELETE FROM EmployeeEarning WHERE ListID = '300000-934380930', you may get an error "invalid bookmark value".</span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">EmployeeEarning SELECT </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT Name, ListID, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate FROM EmployeeEarning</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: If you have trouble seeing your changes, try running your queries in unoptimized mode like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT Name, ListID, PayrollInfoEarningsPayrollItemWageRefListID, PayrollInfoEarningsRate FROM EmployeeEarning <span style="color: #0000ff;">unoptimized</span></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Receive a Payment not be Applied to an Invoice ( How to handle Customer credits on account )]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/359]]></link>
<guid isPermaLink="false"><![CDATA[c058f544c737782deacefa532d9add4c]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[How to Receive a Payment not be applied to an Invoice ( How to handle Customer credits on account ) 
Note: Below is how to receive a payment from a customer that will not be applied to an invoice. In other words, it will be a credit on account, or a depo...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">How to Receive a Payment not be applied to an Invoice <span id="954a71b1-5c1b-492c-847c-45df44e7a861" class="GINGER_SOFTWARE_mark"><span id="d656a269-3403-4c98-b6e9-4e55b0ddcbba" class="GINGER_SOFTWARE_mark">( </span></span>How to handle Customer credits on account<span id="d5fdde8a-6658-4705-be17-c20e0163aad9" class="GINGER_SOFTWARE_mark"><span id="9ded7a00-624c-480a-9563-1784187aa9a0" class="GINGER_SOFTWARE_mark"> )</span></span> </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: Below is how to receive a payment from a customer that will not be applied to an invoice. In other words, it will be a credit on account, or a deposit received. This will be used later once the services have been rendered and the Invoice is generated. Also, how to apply for that credit to account for the Invoice at that time?</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;"><span id="28146291-7992-49f1-af90-95ccf63008c2" class="GINGER_SOFTWARE_mark">Instruction</span> of a Received Payment has not to Invoice Applied </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>In QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; In QuickBooks, when you receive a payment against a customer that has no outstanding invoices as follows:</span></p>
<p><span style="color: #003366; font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q1-01.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="72740f0b-9bb1-42d4-ac25-8e53e3dddb3b" class="GINGER_SOFTWARE_mark"><span id="a4aecd44-bd28-4f0a-90f1-fa05b6c82432" class="GINGER_SOFTWARE_mark">The</span></span> Payment Credit isn't a Credit Memo:</span></p>
<p><span style="color: #003366; font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q1-02.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>In QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; But a ReceivePaymentToDeposit line within QODBC was found by doing the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SELECT TxnID, CustomerRefFullName, <span id="b98b1864-16fb-47e9-8980-2464a2533517" class="GINGER_SOFTWARE_mark"><span id="a7f889f2-b265-4c03-b8ab-7af968b97e67" class="GINGER_SOFTWARE_mark">RefNumber</span></span>, Amount FROM ReceivePaymentToDeposit <br /> <span id="2ebe59cb-adc7-40cf-94ea-c7fa3741f044" class="GINGER_SOFTWARE_mark"><span id="56ff47f1-8159-4c6c-b0fe-782d05a209cb" class="GINGER_SOFTWARE_mark">where</span></span> CustomerRefFullName='Joe Mama Inc 2', <span id="1656828d-7846-4fef-8c71-9fa08347e16a" class="GINGER_SOFTWARE_mark"><span id="82956167-e738-4507-817c-ec0779983b5a" class="GINGER_SOFTWARE_mark">and txnid='8BC1-1481803687'</span></span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q2-00.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Table Schema of ReceivePaymentToDeposit </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Examination of the ReceivePaymentToDeposit table using:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">sp_columns ReceivePaymentToDeposit</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q3-00.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">It shows the table to be <span style="color: #0000ff;">read-only</span>, meaning we can't insert or update the table directly. To get around this, we need first to receive the payment and then apply it to the Invoice later.</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO RECEIVE THE PAYMENT FOR THE CUSTOMER WITHOUT ANY INVOICES</span></h3>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Locate Customer ListID </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; To do this using QODBC, you first need to locate the <span id="c0fa1820-ccbd-43ad-9b3b-4935d6258b8d" class="GINGER_SOFTWARE_mark"><span id="a3a83ed7-9df4-4aec-81eb-8eeea8c2b9ee" class="GINGER_SOFTWARE_mark">ListID</span></span> for the customer by doing the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Select * from Customer where FullName='Data Access Worldwide.'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q4-01.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Here for the "Data Access Worldwide," <span id="62321db3-2fb4-41a0-a4e4-27996dbd2e67" class="GINGER_SOFTWARE_mark"><span id="c7aa91fb-b046-46fa-b731-3e93ec096d3a" class="GINGER_SOFTWARE_mark">customer </span></span><span id="a8bf00e7-3a37-4810-87fa-d2cc0869940d" class="GINGER_SOFTWARE_mark"><span id="eaf430db-91e9-4256-80ce-00af965a5c22" class="GINGER_SOFTWARE_mark">ListID</span></span> is <span style="color: #0000ff;">8000007D-1481804760</span>.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Receive the payment <span id="5f2b68a3-da36-4c89-b2d5-6594a3b0cdfc" class="GINGER_SOFTWARE_mark"><span id="95e8d0f8-cfec-4650-b8f7-37d101522ec9" class="GINGER_SOFTWARE_mark">for</span></span> the customer without any invoices</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO <span id="ec38a5f6-a8c5-4cfa-8eab-f4eeedf4b1e6" class="GINGER_SOFTWARE_mark"><span id="4b5f95f1-bc91-4c1a-a488-08dedd083d25" class="GINGER_SOFTWARE_mark">ReceivePayment</span></span> (<span style="color: #0000ff;">CustomerRefListID</span>, ARAccountRefListID, <br /> <span id="00dbbb55-404e-404d-b3f1-3bed6957c071" class="GINGER_SOFTWARE_mark"><span id="790f468b-5dd0-4585-9b2f-b190bfa7ca52" class="GINGER_SOFTWARE_mark">PaymentMethodRefListID</span></span>, DepositToAccountRefListID, <span id="a77a5ec0-0245-4243-b427-ba3f564d66d6" class="GINGER_SOFTWARE_mark"><span id="9fa3a0ad-9899-466b-ae57-89b02ca849f6" class="GINGER_SOFTWARE_mark">TotalAmount</span></span>, <br /> <span id="48efaaca-4763-4a0f-b361-ce574daa481e" class="GINGER_SOFTWARE_mark"><span id="839fc37c-7ea2-41d2-94f4-93ed9e7bc457" class="GINGER_SOFTWARE_mark">IsAutoApply</span></span>) VALUES ('<span style="color: #0000ff;">8000007D-1481804760</span>', '50001-896816252', <br />'30000-898307887', '20000-896814722', 500.00, TRUE)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q5.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Locate the Transaction ID for this payment</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The transaction ID for the payment we just made is found by doing the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">SP_LASTINSERTID <span id="97cd0dc8-8d47-46c4-9422-0fede84679eb" class="GINGER_SOFTWARE_mark"><span id="7a73186a-2e7a-4898-82d6-955c9a5caedf" class="GINGER_SOFTWARE_mark">ReceivePayment</span></span></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q6.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">It returned a TxnID of&nbsp;<span style="color: #6633cc;">8BD5-1481805044</span></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Locate ReceivePaymentToDeposit Line</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The insert also created a ReceivePaymentToDeposit line found by doing the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Select * from ReceivePaymentToDeposit where <span style="color: #6633cc;">TxnID</span>='<span style="color: #6633cc;">8BD5-1481805044</span>'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q7.png" alt="" /></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE THE INVOICE</span></h3>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Create an Invoice using QODBC </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("<span style="color: #0000ff;">CustomerRefListID</span>", "RefNumber", <br />"<span id="bc7a9584-d89a-4f0e-904c-792b236f9031" class="GINGER_SOFTWARE_mark"><span id="4e187db2-ab3e-435b-a187-2f7f0c96958c" class="GINGER_SOFTWARE_mark">InvoiceLineItemRefListID</span></span>", "InvoiceLineDesc", "InvoiceLineRate", <br />"<span id="ff743ba5-855c-4529-a948-070fe2096c25" class="GINGER_SOFTWARE_mark"><span id="10e714e2-3bdc-4b2f-8363-c5fc1bd540fd" class="GINGER_SOFTWARE_mark">InvoiceLineAmount</span></span>", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") <br />VALUES ('<span style="color: #0000ff;">8000007D-1481804760</span>', 'PRE-PAID1', '8A0003-1044570142', <br />'Bin Permit Renovations', 500.00000, 500.00, '20000-1011136881', 0)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q8.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Locate the Transaction ID for the Invoice </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; To locate the Transaction ID for the Invoice, you can do the following:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="2eda175d-89bb-4140-ab83-158af6b8fd07" class="GINGER_SOFTWARE_mark">select</span> TxnID, R<span id="d5213d6b-2ab2-4c11-93cf-3d2b09bcea53" class="GINGER_SOFTWARE_mark">efNumber</span> from I<span id="c949ca65-4310-41d9-91db-117966bbd0f5" class="GINGER_SOFTWARE_mark">nvoiceLine</span> where&nbsp;<span style="color: #0000ff;"><span id="16431e3a-445f-4473-a2bb-a4a9405b25a3" class="GINGER_SOFTWARE_mark">CustomerRefListID</span></span>&nbsp;= '<span style="color: #0000ff;">8000007D-1481804760</span>'</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q9.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The <span style="color: #990000;">TxnID</span> of the Invoice is: <span style="color: #990000;">8BD8-1481806252</span></span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO APPLY THE PAYMENT TO THE INVOICE OR APPLY A CREDIT MEMO TO THE INVOICE</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Apply the payment <span id="118a4a2d-f0f7-4cf1-a349-e31b6c1861eb" class="GINGER_SOFTWARE_mark">to</span> the Invoice using QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; So now there's <span id="7fd3879c-fb62-48b2-a25f-3edefa8a6830" class="GINGER_SOFTWARE_mark">an</span> invoice. You can do a ReceivePaymentLine to apply that payment to the Invoice and credit the unapplied amount! </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">For existing Credit Memos, you can use the CreditMemo TxnID and apply it in the AppliedToTxnSetCreditCreditTxnID column in the ReceivePaymentLine insert for payments:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ReceivePaymentLine (CustomerRefListID, ARAccountRefListID, <br /> <span id="10dbbbd1-e904-4776-95d8-2227b72ae079" class="GINGER_SOFTWARE_mark">AppliedToTxnTxnID</span>, AppliedToTxnPaymentAmount, AppliedToTxnSetCreditCreditTxnID, <br /> <span id="a95a2283-46ad-4ec5-b7cb-b0cf76ed79b1" class="GINGER_SOFTWARE_mark">AppliedToTxnSetCreditAppliedAmount</span>) VALUES ('8000007D-1481804760', <br />'50001-896816252','8BD8-1481806252', 500.00, '596B-1046217641', 500.00)</span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">NOTE: To apply credit to an existing Invoice using the Credit memo, ensure that, invoice and Credit memo are created.&nbsp; Get the Credit Memo TXN ID and use it in&nbsp;AppliedToTxnSetCreditCreditTxnID</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">When adding a ReceivePaymentLine&nbsp; &nbsp;(adjusting against Credit Memo and Invoice), no new record in the&nbsp;ReceivePaymentLine will be added.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q10.png" alt="" /></span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Display in QuickBooks </span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; The <span id="a92c7a43-6b28-4e30-b033-f8dd49fedf1f" class="GINGER_SOFTWARE_mark">Invoice now</span> displays as PAID in QuickBooks. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/359/Q11.png" alt="" /></span></p>
<p><span style="color: #990000;"><strong><span style="font-family: Arial, Helvetica, sans-serif;">Data Location Information</span></strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #800080;">Where:</span><br /> <span style="color: #0000ff;"><span id="ff5d9de1-01de-480d-a420-7097d91b6f5c" class="GINGER_SOFTWARE_mark">CustomerRefListID</span></span> = '<span style="color: #0000ff;">8000007D-1481804760</span>' (Customer <span id="698dd949-1cb3-49e4-a518-362236a8c4eb" class="GINGER_SOFTWARE_mark">ListID</span> - Required)<br /> <span id="8254e97c-6543-4215-b4b6-265118f9ec33" class="GINGER_SOFTWARE_mark">DepositToAccountRefListID</span> = '20000-896814722' (Undeposited Funds Account ListID)<br /> <span id="68789118-9c08-46ba-9913-54284cb453b0" class="GINGER_SOFTWARE_mark">ARAccountRefListID</span> = '50001-896816252' (Accounts Receivable Account ListID)<br /> <span style="color: #990000;"><span id="9e50f488-702a-45a1-a5a9-28c4aa510e2f" class="GINGER_SOFTWARE_mark">AppliedToTxnTxnID</span></span> = '<span style="color: #990000;">8BD8-1481806252</span>' (Find TxnID in Invoice Table)</span><span style="color: #6633cc;"><span id="c5e3331b-b46b-4421-bc6f-b9f169328a1d" class="GINGER_SOFTWARE_mark"><br />AppliedToTxnSetCreditCreditTxnID</span></span> = '<span style="color: #6633cc;">5967-1046217547</span>' (Find TxnID in ReceivePaymentToDeposit Table) OR&nbsp;(Find TxnID in CreditMemo Table)</p>
<h2><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <span style="color: #6633cc;"><span id="4b763711-2cb8-411a-8059-5a77f5a5130c" class="GINGER_SOFTWARE_mark">Troubleshooting</span></span></span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Cannot Locate Transaction ID </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; When you cannot get the transaction ID information, please try doing as below:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">sp_optimizefullsync ReceivePaymentLine</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">sp_optimizefullsync ReceivePaymentToDeposit<br /> <br /> <span id="2136827f-5936-4c84-b9f3-17298bb9f986" class="GINGER_SOFTWARE_mark">to</span> <span id="8ca76cab-85ce-40a4-b62e-1cc56dd62220" class="GINGER_SOFTWARE_mark">resync</span> your optimized ReceivePaymentLine and ReceivePaymentToDeposit tables. </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp; Once that's done, do the following:<br /> <br />Select * From ReceivePaymentLine WHERE CustomerRefListID = '21D0000-1160000365'</span><span style="font-family: Arial, Helvetica, sans-serif;"><br /> <br />Select * From ReceivePaymentToDeposit WHERE CustomerRefListID = '21D0000-1160000365'<br /> <br /> <span id="ef31387e-394a-47c5-be8d-cba5bac89b5e" class="GINGER_SOFTWARE_mark">And</span> try finding the transactions you are looking for.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><br /> </span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to apply multiple Invoices <span id="2a9a9145-1a64-4cb3-a6fb-98ac7044c56f" class="GINGER_SOFTWARE_mark">to</span> a Payment</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp; &nbsp; &nbsp;It would help if you</span><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;wrote multiple inserts using the "<strong><span style="color: #000000;">FQSaveToCache</span></strong>." Multi-<span id="b403528c-92e4-4107-a124-1b1ecbca2483" class="GINGER_SOFTWARE_mark">line transactions</span> require a series of SQL statements to complete a single transaction. The key to this process is the field named "FQSaveToCache." This field is not part of the table but is used as a flag to the QODBC driver. The value of "FQSaveToCache" is set to 1 or TRUE for the insert statements, and then it is set to 0 or FALSE for the final insert statement for the transaction.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2345" target="_blank">How to create multiple lines in the Invoice, Purchase, and Journal table</a> for examples.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">And try looking at: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/263" target="_blank">How do I create a new Customer, invoice them and mark the Invoice as paid?</a> <span id="ce5bfe8a-2b9e-492f-9df2-eaaa00f11f5a" class="GINGER_SOFTWARE_mark">For</span> the usual method of producing an existing invoice.</span></p>
<p>&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">How to Apply Credit to an Invoice</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I require customers to submit a <span id="276613f7-262a-4231-bc98-51c25593729e" class="GINGER_SOFTWARE_mark">deposit when</span> they open their account, and some customers pre-pay for <span id="b8248335-809a-4a05-8174-0c86a7d1fe26" class="GINGER_SOFTWARE_mark">service</span> or submit frequent deposits. I want these credits to be applied to their invoices when the Invoice <span id="00e580a6-3bb5-4e22-92c2-d485eece7a8d" class="GINGER_SOFTWARE_mark">is created</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">My insert statement seems to work if the invoiced amount is &lt;= to the </span><span id="2d3f856e-9a25-4bbd-bb06-afad545e4435" class="GINGER_SOFTWARE_mark" style="font-family: Arial, Helvetica, sans-serif;"><span id="778012e1-188d-47c3-9d8c-c82b443d907d" class="GINGER_SOFTWARE_mark">unused payment</span></span><span style="font-family: Arial, Helvetica, sans-serif;"> amount for the payment. But it does not work if the invoiced amount is &gt; than the new payment amount. If the invoiced amount &gt; new payment amount, I need to apply for the remaining credit and send the customer the Invoice for the remaining amount.</span></p>
<p><span style="font-family: arial, helvetica, sans-serif;">Here is my insert statement:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ReceivePaymentLine<span id="6f6e606d-dc3d-4706-a81d-342dbb5c2d41" class="GINGER_SOFTWARE_mark"><span id="41fdada4-e959-43b1-9aab-7d05cbe9e1c5" class="GINGER_SOFTWARE_mark">(</span></span></span>CustomerRefListID,&nbsp;ARAccountRefListID,&nbsp;AppliedToTxnTxnID,&nbsp;AppliedToTxnPaymentAmount,&nbsp;AppliedToTxnSetCreditCreditTxnID,&nbsp;AppliedToTxnSetCreditAppliedAmount)&nbsp;<br />VALUES (?,&nbsp;'80000020-1236740661',&nbsp;?,&nbsp;?,&nbsp;?,&nbsp;?)&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">As an example:<br /><br /><span id="b56e94bf-7570-4bb5-a145-b56d6ee49bf1" class="GINGER_SOFTWARE_mark">invoice</span> number=20097106<br /><span id="bd1f4776-3965-4ead-876d-2cf7ad83f020" class="GINGER_SOFTWARE_mark">invoice</span> transaction id=543CF-1409233024<br /><span id="82d7aec9-1662-4d3f-9244-826aba3aca2c" class="GINGER_SOFTWARE_mark">invoice</span> amount = 90<br /><span id="7656b63b-3db7-43de-81fe-31b59b3f2be4" class="GINGER_SOFTWARE_mark">payment</span> id=543B2-1409169998<br /><span id="89be1129-2031-4f47-8713-4d3b67edfa94" class="GINGER_SOFTWARE_mark">unused</span> payment amount=87<span id="b338c62f-26cb-4300-8b9e-5450fc371bc5" class="GINGER_SOFTWARE_mark">.</span>12<br /><span id="4147aa5e-402d-4ed2-935b-6ce374db5ed1" class="GINGER_SOFTWARE_mark">customer</span> id=800000A7-1298568764<br /><br />The insert statement would then be:<br /><br />INSERT INTO ReceivePaymentLine (CustomerRefListID<span id="d39df04f-42c5-4276-99f2-bf94b5714e74" class="GINGER_SOFTWARE_mark"><span id="73cbabd4-d96d-4b98-b3fa-b17ca68100c1" class="GINGER_SOFTWARE_mark">,</span></span>ARAccountRefListID<span id="f7ab8a43-3e6e-465b-bae0-02c7c7cf69d2" class="GINGER_SOFTWARE_mark"><span id="73bb59d5-685b-4def-8dcc-a583135fdb78" class="GINGER_SOFTWARE_mark">,</span></span>AppliedToTxnTxnID<span id="d1c77567-4fb6-4f4b-a424-7c39feb2e48c" class="GINGER_SOFTWARE_mark"><span id="c84fbed4-bb68-41fb-85c7-73c6a39d6b64" class="GINGER_SOFTWARE_mark">,</span></span>AppliedToTxnPaymentAmount<span id="c9a1a6c7-1686-4f2b-9ab9-22a0800483a6" class="GINGER_SOFTWARE_mark"><span id="bbefbd01-88fd-4420-95b8-f165d92b1e9c" class="GINGER_SOFTWARE_mark">,</span></span>AppliedToTxnSetCreditCreditTxnID<span id="dfa97bfa-90fb-4c43-9757-001aaa54bbef" class="GINGER_SOFTWARE_mark"><span id="2595a6ce-ef4f-49b7-807c-91d8d35b6d1d" class="GINGER_SOFTWARE_mark">,</span></span>AppliedToTxnSetCreditAppliedAmount)&nbsp;<br />VALUES ('800000A7-1298568764',&nbsp;'80000020-1236740661',&nbsp;'543CF-1409233024',&nbsp;87.12,&nbsp;'543B2-1409169998',&nbsp;87.12)&nbsp;<br /><br />This statement fails with the following error: "Error 3180 - There was an error when saving a receive payment. QuickBooks error message: Transaction not in balance.&nbsp;<br /><br />This particular customer had another payment of $2999, so when I try the insert with the remaining payment&gt; invoiced amount, it works:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;<br /><span id="e80dfaf0-09ee-40b3-ab5e-2256533e3aac" class="GINGER_SOFTWARE_mark">invoice</span> number=20097106<br /><span id="ddbed92c-1b94-4bc4-98d4-1c1f934b9738" class="GINGER_SOFTWARE_mark">invoice</span> transaction id=543CF-1409233024<br /><span id="5952d387-ad83-430b-9697-1008692597e1" class="GINGER_SOFTWARE_mark">invoice</span> amount = 90<br /><span id="54b26ac7-7623-48e8-9d64-ecd71e5bdf9d" class="GINGER_SOFTWARE_mark">payment</span> id=543BD-1409177019<br /><span id="a01482d0-ea02-4651-b8e7-8864b96b9089" class="GINGER_SOFTWARE_mark"><span id="2ba580f1-0a42-432b-8944-2ba8a24ccf05" class="GINGER_SOFTWARE_mark">unused</span></span> payment amount=2999<br /><span id="489edfcd-dbec-4e55-9b89-33eccfbd8262" class="GINGER_SOFTWARE_mark">customer</span> id=800000A7-1298568764&nbsp;</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ReceivePaymentLine (CustomerRefListID<span id="523a5c93-1ea9-4921-a9af-76f714067f91" class="GINGER_SOFTWARE_mark">,</span>ARAccountRefListID<span id="6abb2037-a1df-4473-8145-b918231ba724" class="GINGER_SOFTWARE_mark">,</span>AppliedToTxnTxnID<span id="3c4fc1fe-3c7e-4e3b-8dee-4960190de997" class="GINGER_SOFTWARE_mark">,</span>AppliedToTxnPaymentAmount<span id="a2545731-71af-4c55-afd2-b6826a537fd1" class="GINGER_SOFTWARE_mark">,</span>AppliedToTxnSetCreditCreditTxnID<span id="d91dbc0a-a1fb-443d-a3be-c83f2568a00a" class="GINGER_SOFTWARE_mark">,</span>AppliedToTxnSetCreditAppliedAmount)<br />VALUES ('800000A7-1298568764','80000020-1236740661','543CF-1409233024',90.0,'543BD-1409177019',90.0)<br /><br />What do I need to do to have the credit successfully applied when the invoiced amount &gt; the new payment amount?<br /><br /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Solution:</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">I want to inform you that when the credit amount is less than the Invoice amount &amp; you want to apply for the credit. You need to put zero value in "AppliedToTxnPaymentAmount" column and put the credit value "AppliedToTxnSetCreditAppliedAmount" column. So you can resolve the transaction, not in Balance error.</span><br /><br /><span style="font-family: arial, helvetica, sans-serif;">You can see the same in QuickBooks UI; when you apply for credit, the Payment textbox will remain zero.</span><br /><br /><span style="font-family: arial, helvetica, sans-serif;">Please refer below query:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ReceivePaymentLine (CustomerRefListID, ARAccountRefListID, AppliedToTxnTxnID, AppliedToTxnPaymentAmount, AppliedToTxnSetCreditCreditTxnID, AppliedToTxnSetCreditAppliedAmount)&nbsp;</span><br />VALUES ('800000A7-1298568764', '80000020-1236740661', '543CF-1409233024', 0, '543B2-1409169998', 87.12)</p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Keywords<span id="735c7460-5e14-4520-9ce7-b5954a3e4ccd" class="GINGER_SOFTWARE_mark"><span id="a0a5e3e6-90f5-4091-9801-5a57d58c72bb" class="GINGER_SOFTWARE_mark">:</span></span> Receive,&nbsp;how to make payment through Invoice using qodbc</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Create an Item Inventory Assembly using QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/280]]></link>
<guid isPermaLink="false"><![CDATA[92c8c96e4c37100777c7190b76d28233]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[ How to Create an Item Inventory Assembly using QODBC 
An Example of Creating One ItemInventoryAssembly with Two Lines 
Note the FQSaveToCache field, set to True except on the last one.
First Line 
INSERT INTO "ItemInventoryAssemblyLine" ("Name", "IsA...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;"> How to Create an Item Inventory Assembly using QODBC </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">An Example of Creating One ItemInventoryAssembly with Two Lines </span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Note the <span style="color: #0000ff;">FQSaveToCache</span> field, set to True except on the last one.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>First Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "ItemInventoryAssemblyLine" ("Name", "IsActive", "SalesDesc", "IncomeAccountRefListID", <br />"COGSAccountRefListID", "AssetAccountRefListID", <br />"ItemInventoryAssemblyLnItemInventoryRefListID", "ItemInventoryAssemblyLnQuantity", <br />"<span style="color: #0000ff;">FQSaveToCache</span>") <br />VALUES ('NewAssembly1', 1, 'QODBC New Assembly1', '1B0000-933270542', '1E0000-933270542', <br />'60000-933270541', '5A0000-1197758364', 2.0, <span style="color: #0000ff;">1</span>)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemAssembly1.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Second Line </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "ItemInventoryAssemblyLine" ("Name", "IsActive", "SalesDesc", "IncomeAccountRefListID", <br />"COGSAccountRefListID", "AssetAccountRefListID", <br />"ItemInventoryAssemblyLnItemInventoryRefListID", "ItemInventoryAssemblyLnQuantity", <br />"<span style="color: #0000ff;">FQSaveToCache</span>") <br />VALUES ('NewAssembly1', 1, 'QODBC New Assembly1', '1B0000-933270542', '1E0000-933270542', <br />'60000-933270541', '5B0000-1197761433', 1.0, <span style="color: #0000ff;">0</span>)</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemAssembly2.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks 2006 </strong></span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/ItemAseembly3.JPG" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See also: <a href="http://archive.qodbc.com/forum8917.html?homeinclude=topicdetails&amp;forum_id=1&amp;category_id=19&amp;post_id=698" target="_blank">Trying to update the ItemInventoryAssemblyLine table</a></span></p>
<p>&nbsp;</p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">Questions and Answers </span></h2>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Question</span></h3>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; This seems to work for adding multiple items (ItemInventoryAssemblyLine records) to an assembly when the assembly is first created.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; However, I am having trouble adding new ItemInventoryAssemblyLine records to an existing assembly. When I try to repeat an INSERT with FQSaveToCache set to 0, then I get an error</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">QODBC Error 3100 - The name "NewAssembly1" of the list element is already in use (#10053)</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">Answer</span></h3>
<p>&nbsp;&nbsp; <span style="font-family: Arial, Helvetica, sans-serif;">I don't think we can add items to an existing assembly. The workaround would be to create a new assembly with the additional items</span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to Create a new Customer, Job, Invoice them and Mark the Invoice as paid]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/263]]></link>
<guid isPermaLink="false"><![CDATA[8c19f571e251e61cb8dd3612f26d5ecf]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[ How to Create a new Customer, Job, Invoice them, and Mark the Invoice as paid
Note: The following example uses QuickBooks 2006 USA Sample Rock Castle Construction company file.
TO CREATE THE NEW CUSTOMER
Query Run in QODBC 
insert into customer 
(na...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;"> How to Create a <span id="0e158ec6-483b-4c9e-a654-02fd31bf8f6b" class="GINGER_SOFTWARE_mark">new</span> Customer, Job, Invoice them, and Mark the Invoice as paid</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note:</strong> The following example uses QuickBooks 2006 USA Sample Rock Castle Construction company file.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO CREATE THE NEW CUSTOMER</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query Run in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="18bdc42f-30ba-40d2-810e-8e516ce92d1f" class="GINGER_SOFTWARE_mark">insert</span> into customer </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">(<span id="16f9363f-12f5-4313-8ff6-3c7eed546604" class="GINGER_SOFTWARE_mark">name</span>, first name, last name, company name, contact, <span id="ab778323-4f9e-4222-8aed-5de7612e1d5b" class="GINGER_SOFTWARE_mark">accountNumber</span>, BillAddressAddr1, BillAddressAddr2, <br />BillAddressAddr3, BillAddressCity, BillAddressState, BillAddressPostalCode, Phone, Fax, Email, <br />TermsRefListID, SalesTaxCodeRefListID, PreferredPaymentMethodRefFullName, CreditCardInfoCreditCardNumber,<br /> <span id="1e1271ab-7c6e-4aec-8a0c-9c2224435011" class="GINGER_SOFTWARE_mark">CreditCardInfoExpirationMonth</span>, CreditCardInfoExpirationYear, CreditCardInfoNameOnCard,<br /> <span id="630a3adb-ba29-4fdc-b52b-9ebe99847506" class="GINGER_SOFTWARE_mark">CreditCardInfoCreditCardAddress</span>, CreditCardInfoCreditCardPostalCode, JobStatus,<br /> <span id="8383161f-00c7-4ae4-bd49-daf9277fe024" class="GINGER_SOFTWARE_mark">JobStartDate</span>, JobEndDate, JobDesc)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="f9e08b78-e896-4f21-a5e6-c61eb706b214" class="GINGER_SOFTWARE_mark">values</span> </span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">('Joe Mama Inc 2', 'Joe', 'Mama', 'Joe Mama Inc 2', 'Joe Mama', '343453', 'Joe Mama Inc', '123 Main St.', <br />'Suite 456', 'Chicago', 'IL', '60602', '555-555-5555', '666-666-6666', <a href="mailto:'joe@mama.com'">'joe@mama.com'</a>, <br />'30000-898307887', '10000-1011136881', 'Visa', '4111111111111111', 06, 2022, 'Joe Mama',<br />'123 Main St. Suite 450', '60707', '<span id="317725cb-a434-4a7c-b1d4-322ddcb6be6a" class="GINGER_SOFTWARE_mark">None</span>', {d'2017-05-11'}, null, '$39.95 Monthly Subscription - Bill CC Monthly'<br />)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QODBC </strong></span></p>
<p align="center"><img src="https://support.flexquarters.com/esupport/newimages/263/Q1-00.png" alt="" /></p>
<p><strong> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO DETERMINE THE ListID OF THE NEW CUSTOMER</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC</strong></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp; Here we use a sp_command named "SP_LASTINSERTID" to get the <span id="d666a76a-3fb7-4273-a7f6-f75832c9fb07" class="GINGER_SOFTWARE_mark">ListID</span> <span id="d63f18b3-0962-4fab-b0bd-65d67416f0dd" class="GINGER_SOFTWARE_mark">of</span> the newly created customer.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp; SP_LASTINSERTID customer ====&gt; <span style="color: #ff0000;">8000007A-1481800232</span></span></p>
<p align="center"><img src="https://support.flexquarters.com/esupport/newimages/263/Q2-00.png" alt="" /></p>
<p align="center">&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO CREATE&nbsp;A NEW&nbsp;JOB RECORD UNDER A CUSTOMER&nbsp;</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query Run in QODBC </strong></span></p>
<p>INSERT INTO Customer (Name, ParentRefFullName, JobDesc, JobTypeRefFullName) VALUES ('JobName-001',&nbsp; 'Joe Mama Inc 2', 'Description of Job','Commercial')</p>
<div>
<div class="m_-4580633308283959543m_4538412499746955989gmail_signature" dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>This should create a new job record under the customer&nbsp;<span style="color: #ff0000;">Joe Mama Inc 2.</span>&nbsp;</div>
</div>
</div>
</div>
</div>
<p align="center">&nbsp;</p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO CREATE THE INVOICE</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", <br />"<span id="7c8ff1a3-57e3-45ff-9274-a2a7d4549715" class="GINGER_SOFTWARE_mark">InvoiceLineItemRefListID</span>", "InvoiceLineDesc", "InvoiceLineRate", <br />"<span id="9e85b3b2-57b1-4755-92a1-dc021006eac4" class="GINGER_SOFTWARE_mark">InvoiceLineAmount</span>", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") <br />VALUES (<span style="color: #ff0000;">'8000007A-1481800232'</span>, 'QODBCcip', '670004-1044572237', 'Bin Permit Renovations', <br />200.00000, 200.00, '20000-1011136881', 0)</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QODBC </strong></span></p>
<p align="center"><img src="https://support.flexquarters.com/esupport/newimages/263/Q3-00.png" alt="" /></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO LOCATE THE TXNID OF THE INVOICE</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; Here we also use the SP_LASTINSERTID sp_command to get the newly created TxnID of InvoiceLine. </span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; SP_LASTINSERTID <span id="712efc70-0d13-45a0-9315-5038d43c009b" class="GINGER_SOFTWARE_mark">invoiceline</span> ====&gt; <span style="color: #ff0000;">24309-1639565563</span></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Or you could use the query below to get the TxnID:&nbsp; </span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">&nbsp; &nbsp; &nbsp;select TxnID, RefNumber from InvoiceLine where CustomerRefListID = '8000007A-1481800232'&nbsp;</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QODBC </strong></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">SP_LASTINSERTID Method </span></p>
<p align="center"><img src="https://support.flexquarters.com/esupport/newimages/263/Q4-00.png" alt="" /></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">Normal Query Method</span></p>
<p align="center"><img src="https://support.flexquarters.com/esupport/newimages/263/Q5-00.png" alt="" /></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO RECEIVE THE PAYMENT</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">INSERT INTO ReceivePaymentLine (CustomerRefListID, DepositToAccountRefListID, <span id="d3791c5b-3287-4d44-8b7f-9fbf34c34445" class="GINGER_SOFTWARE_mark">TotalAmount</span>, <br /> <span id="edf19e33-f777-4fac-b3c8-048ae84299d7" class="GINGER_SOFTWARE_mark">AppliedToTxnTxnID</span>, AppliedToTxnPaymentAmount, TxnDate, Memo)<br />Values ('8000007A-1481800232', '<span style="color: #0000ff;">20000-896814722</span>', 200.00, <span style="color: #ff0000;">'8BB6-1481800690'</span>, 200.00, <br />{d'2021-12-13'}, 'Payment for Invoice #QODBCcip')</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QODBC </strong></span></p>
<p align="center"><img src="https://support.flexquarters.com/esupport/newimages/263/Q6-00.png" alt="" /></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">See also: <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/359" target="_blank">How to Receive A Payment not be applied to an Invoice <span id="8d627914-1e04-49f9-8376-1fd90a5f170f" class="GINGER_SOFTWARE_mark">( </span>How to handle Customer credits on account<span id="d2f287e1-f0ac-41c7-8036-e687224ad0d8" class="GINGER_SOFTWARE_mark"> )</span></a> for more information on the procedure for receiving the Payment before the Invoice.</span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Related Data Description </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="c30ce6b3-000f-46dc-b25a-cd8fc749a943" class="GINGER_SOFTWARE_mark">CustomerRefListID</span> - This is the <span id="6513dc56-8e39-4ca1-b4ff-f8302d8d588f" class="GINGER_SOFTWARE_mark">ListID</span> of the Customer in the Customer table.<br /> <span id="7d8ebcc3-3156-4aeb-99bf-692c58654a33" class="GINGER_SOFTWARE_mark">DepositToAccountRefListID</span> - This is the <span id="0a3856fc-b07a-4b4a-b2e7-85e38acf6323" class="GINGER_SOFTWARE_mark">ListID</span> <span id="2f04736b-8015-4638-b667-5f4c6a7fd499" class="GINGER_SOFTWARE_mark">of</span> your <span style="color: #000080;">Undeposited Funds</span> Account from the Account table.<br /> <span id="0f6f8e67-95eb-4056-a73d-a03cff065f76" class="GINGER_SOFTWARE_mark">TotalAmount</span> - The Total amount of the Payment.<br /> <span id="549ec49f-710f-41b9-b97e-a20a3232eef7" class="GINGER_SOFTWARE_mark">AppliedToTxnTxnID</span> - This is the TxnID of the Invoice to <span id="d8f19c22-6085-4b54-8a05-52309f38d124" class="GINGER_SOFTWARE_mark">pay</span> the Invoice table.<br /> <span id="28ce9081-0e22-4d40-b696-b4582975d8ea" class="GINGER_SOFTWARE_mark">AppliedToTxnPaymentAmount</span> - The Payment Amount to apply. is&nbsp;<span id="13ec0d9f-46be-48c5-8693-856642040e1b" class="GINGER_SOFTWARE_mark">usually</span> the same amount as <span id="75f96ed1-2868-4484-a104-900a238e2bb4" class="GINGER_SOFTWARE_mark">TotalAmount</span>.<br /> <span id="eea4377f-0e83-40e0-86f5-b1c2fa800538" class="GINGER_SOFTWARE_mark">TxnDate</span> - The date of the payment transaction in {<span id="9a7004cc-0ecc-453e-9b9a-7e37830bb0a3" class="GINGER_SOFTWARE_mark">d'YYYY</span>-MM-DD'} format.<br />Memo - Any text to identify the Payment.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; When you <span id="c5794ca5-6208-4997-b761-8c53a2fbf3b2" class="GINGER_SOFTWARE_mark">set up</span> your Company file, you had to nominate an Account for <span style="color: #000080;">Undeposited Funds:</span></span></p>
<p align="center"><img src="https://support.flexquarters.com/esupport/newimages/263/Q7.png" alt="" /></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to convert a Sales Order into an Invoice]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/75]]></link>
<guid isPermaLink="false"><![CDATA[d09bf41544a3365a46c9077ebb5e35c3]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[&nbsp;
An Example of Converting a Sales Order into an Invoice 
Note: To understand the process for everyone, I will do a simple one-line estimate example, make it a Sales Order, and then make it into an Invoice.
TO CREATE THE ESTIMATE
Query in QODBC ...]]></description>
<content:encoded><![CDATA[<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;</span></p>
<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Converting a Sales Order into an Invoice </span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: To understand the <span id="246b72ad-192b-484f-81c7-46ef5c34e346" class="GINGER_SOFTWARE_mark">process for</span> everyone, I will do a simple one-line estimate example, make it a Sales Order, and then make it into <span id="d2410b33-97c6-4a8e-8755-c53865faddac" class="GINGER_SOFTWARE_mark">an</span> Invoice.</span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">TO CREATE THE ESTIMATE</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">The following SQL statement will create a new estimate:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "<span id="41496c7c-3c8d-42d4-affb-270f4e430b48" class="GINGER_SOFTWARE_mark">EstimateLine</span>" ("CustomerRefListID", "<span style="color: #0000ff;">RefNumber</span>", "EstimateLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;"><span id="1b24f2a0-eff6-42f0-88c4-bb78a7144d41" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") VALUES ('3D0000-1040150817', '<span style="color: #0000ff;">201</span>', '6F0003-1049234090', <br />&nbsp;&nbsp;&nbsp;&nbsp; 'Building permit No 201', 100.00000, 100.00, '20000-1011136881', <span style="color: #ff0000;">0</span>)</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q1-00.png" alt="" /></span></p>
<p><strong><br /> <strong>Note:</strong>&nbsp;</strong>&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2981" target="_blank">QODBC Support Wizard</a> is used only to test QODBC SQL queries and is not a development tool.</p>
<p>&nbsp;</p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> The above query results in the following estimate in the QuickBooks 2006 Premier USA Edition - Sample Rock Castle Construction company file:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q1-01.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE A SALES ORDER FROM AN ESTIMATE</span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">When we're ready to create the Sales Order, we can read the <span id="d45dc1d7-7563-4345-be4b-bdfe8ec10494" class="GINGER_SOFTWARE_mark">EstimateLine</span> table and insert it into the SalesOrderLine table like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "SalesOrderLine" ("CustomerRefListID", "RefNumber", "Memo", "SalesOrderLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "SalesOrderLineDesc", "SalesOrderLineRate", "SalesOrderLineAmount", "SalesOrderLineSalesTaxCodeRefListID",<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span id="8d5b6e22-2d8d-48c2-9757-ee9c384508ed" class="GINGER_SOFTWARE_mark">FQSaveToCache</span>") <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select "CustomerRefListID", "<span style="color: #0000ff;">RefNumber</span>", {fn CONCAT<span id="e2616b0f-2185-4ddc-a59e-3681342b6028" class="GINGER_SOFTWARE_mark">(</span>'Estimate ', "<span style="color: #0000ff;">RefNumber</span>")} as "Memo","EstimateLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "EstimateLineDesc", "EstimateLineRate", "EstimateLineAmount", "EstimateLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span id="2a043b1f-a2de-454b-9b29-5450c1497e90" class="GINGER_SOFTWARE_mark">FQSaveToCache</span>" from <span id="88eff55d-8138-4a9a-ac3d-09fb8bc90653" class="GINGER_SOFTWARE_mark">EstimateLine</span> where <span style="color: #000000;">"<span style="color: #0000ff;">RefNumber</span>"='<span style="color: #0000ff;">201</span>'</span> and "EstimateLineSeqNo"=1</span></p>
<p><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong></span><span style="font-family: Arial, Helvetica, sans-serif;">: This is one complete SQL statement. For multiple estimate lines, you would set <span style="color: #ff0000;">FQSaveToCache</span> to<span style="color: #ff0000;">1</span> instead (using<span id="e81c3784-3c38-49a5-b291-bdd33c8bb9ee" class="GINGER_SOFTWARE_mark">:</span>1 "FQSaveToCache") and loop the EstimateLineSeqNos until the last one setting <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">0</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q2-00.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The estimate now appears as a Sales Order in QuickBooks with "Estimate 201" in the memo field, the same way QuickBooks creates <span id="eb061be6-3808-4b95-ac7d-6a6388d10006" class="GINGER_SOFTWARE_mark">a</span> Sales&nbsp;<span id="b396369b-15e9-41ec-8d0f-1f402fac3af4" class="GINGER_SOFTWARE_mark">Order from</span> <span id="331ac84b-42a0-4aa6-9efe-366fb1a7843f" class="GINGER_SOFTWARE_mark">an</span> Estimate.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q2-01.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE AN INVOICE FROM THE SALES ORDER </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">When we're ready to create <span id="1c901cb6-47e3-435a-8aa4-e04387e177e3" class="GINGER_SOFTWARE_mark">t</span>he Invoice, we can read the SalesOrderLine table and insert it into the <span id="a5cb29fd-dc79-44cc-9a17-6f7c0910f1bb" class="GINGER_SOFTWARE_mark">InvoiceLine</span> table like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", "Memo", "InvoiceLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID",<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span id="47771132-2768-4df0-a27f-6f821aaa6b47" class="GINGER_SOFTWARE_mark">FQSaveToCache</span>") <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select "CustomerRefListID", {fn CONCAT<span id="ad5e5d4e-2d9f-487d-822a-63d476ea94c8" class="GINGER_SOFTWARE_mark">(</span>'I', "<span style="color: #0000ff;">RefNumber</span>")} as "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<span id="7724dcf7-1d08-4588-af37-0ff5ceb316d6" class="GINGER_SOFTWARE_mark">fn</span> CONCAT<span id="c3ceb2df-e78b-486f-a771-408364119675" class="GINGER_SOFTWARE_mark">(</span>'Sales Order ', "<span style="color: #0000ff;">RefNumber</span>")} as "Memo","SalesOrderLineItemRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "SalesOrderLineDesc", "SalesOrderLineRate", "SalesOrderLineAmount", "SalesOrderLineSalesTaxCodeRefListID", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span id="fbb74086-f5b2-4b48-8e8b-b75b1c40f1ea" class="GINGER_SOFTWARE_mark">FQSaveToCache</span>" from SalesOrderLine where "CustomerRefListID"='3D0000-1040150817'<span id="757f628a-b126-4c97-be6e-a165c9913a03" class="GINGER_SOFTWARE_mark">:</span>and "<span style="color: #0000ff;">RefNumber</span>"='<span style="color: #0000ff;">201</span>' <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="f6e2d78e-8ce5-41b9-82d0-2c57666d3530" class="GINGER_SOFTWARE_mark">and</span> "SalesOrderLineSeqNo"=1</span></p>
<p><strong><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Note</span></strong><span style="font-family: Arial, Helvetica, sans-serif;">: This is one complete SQL statement. For multiple estimate lines, you would set <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">1</span> instead (using<span id="90b71f87-a280-438c-91a6-2ea0f364754e" class="GINGER_SOFTWARE_mark">:</span>1 as "FQSaveToCache") and loop the SalesOrderLineSeqNos until the last one setting <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">0</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q3-00.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The Sales Order now appears as <span id="d16e6864-973a-4a8b-8b0e-7c3913991f2e" class="GINGER_SOFTWARE_mark">an</span> Invoice In <span id="bd9d3f31-c78d-4e8a-8fab-56a42d02c74f" class="GINGER_SOFTWARE_mark">QuickBooks. But</span> is unlinked to the Sales Order line at this stage.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q3-01.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial, Helvetica, sans-serif;">CREATE A LINKED INVOICE FROM THE SALES ORDER </span></h3>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Query in QODBC</strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> When we're ready to create the Invoice, we can read the SalesOrderLine table and insert it into the <span id="e076e8ca-4bd0-4af4-a852-ea5e11499e0d" class="GINGER_SOFTWARE_mark">InvoiceLine</span> table as a linked Invoice instead like this:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO "InvoiceLine" ("CustomerRefListID", "RefNumber", <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span id="6fe6589a-b1da-4ee0-a9bd-35a1c1bcfdcc" class="GINGER_SOFTWARE_mark">InvoiceLineLinkToTxnTxnID</span>", "InvoiceLineLinkToTxnTxnLineID",<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span style="color: #ff0000;"><span id="093193a3-da24-4a89-bfc2-2546d41a847e" class="GINGER_SOFTWARE_mark">FQSaveToCache</span></span>") <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select "CustomerRefListID", {fn CONCAT<span id="bfcf09bb-6207-43e1-8b3a-a21d2d2615a6" class="GINGER_SOFTWARE_mark">(</span>'SOLink', "RefNumber")}, <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "<span id="824cb807-ece9-48f5-b738-c62ee1e6281e" class="GINGER_SOFTWARE_mark">TxnID</span>", "SalesOrderLineTxnLineID",<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #ff0000;">0</span> as "FQSaveToCache" from SalesOrderLine <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="ea95c09b-1e68-499f-9453-1007f8b7287a" class="GINGER_SOFTWARE_mark">where</span> "CustomerRefListID"='3D0000-1040150817'<span id="90ba019a-cd07-4d38-b72a-6da8ff588c5e" class="GINGER_SOFTWARE_mark">:</span>and <span style="color: #000000;">"<span style="color: #0000ff;">RefNumber</span>"='<span style="color: #0000ff;">201</span>'</span></span> <span style="font-family: Arial, Helvetica, sans-serif;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="a5f62fb4-5e47-48f6-998d-9651e544af73" class="GINGER_SOFTWARE_mark">and</span> "SalesOrderLineSeqNo"=1</span></p>
<p><strong><span style="color: #000000; font-family: Arial, Helvetica, sans-serif;">Note</span></strong><span style="font-family: Arial, Helvetica, sans-serif;">: This is one complete SQL statement; for multiple estimate lines, you would set <span style="color: #ff0000;">FQSaveToCache</span> to<span style="color: #ff0000;"> 1</span> instead (using<span id="37e47377-6184-49a2-8365-f3fa3ab477ee" class="GINGER_SOFTWARE_mark">:</span>1 as "FQSaveToCache") and loop the SalesOrderLineSeqNos until the last one setting <span style="color: #ff0000;">FQSaveToCache</span> to <span style="color: #ff0000;">0</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q4-00.png" alt="" /></span></p>
<p><span style="color: #990000; font-family: Arial, Helvetica, sans-serif;"><strong>Result in QuickBooks </strong></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">The query above results in the following linked Invoice in the QuickBooks 2022 Enterprise USA Edition - Sample company file:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q4-02.png" alt="" /></span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><span id="5ad3bf18-1a6c-4143-9586-34bff6dfb874" class="GINGER_SOFTWARE_mark">And</span> because there was only one line in the <span id="8ca49124-f7c0-4528-81e5-9f1240854f98" class="GINGER_SOFTWARE_mark">example S</span>ales Order, the Sales Order has also been marked "<span style="color: #ff0000;">INVOICED IN FULL</span>."</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><img src="https://support.flexquarters.com/esupport/newimages/75/Q4-01.png" alt="" /></span></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-Desktop] How to use LIKE in query with QODBC]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/35]]></link>
<guid isPermaLink="false"><![CDATA[1c383cd30b7c298ab50293adfecb7b18]]></guid>
<pubDate><![CDATA[Thu, 12 Mar 2009 17:21:52 +0000]]></pubDate>
<dc:creator><![CDATA[brad waddell]]></dc:creator>
<description><![CDATA[An Example of Using LIKE in Query
Note: There's no problem with the&nbsp;LIKE any value.
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Here we are  running the following query as an example to show how alike&nbsp;"i%" works to find "Invoice" type sales:
&nbsp;&nbsp;...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial, Helvetica, sans-serif;">An Example of Using LIKE in Query</span></h2>
<p><span style="font-family: Arial, Helvetica, sans-serif;"><strong>Note</strong>: There's no problem with the&nbsp;<span style="color: #800000;">LIKE any value</span>.</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Here we are </span><span style="font-family: Arial, Helvetica, sans-serif;"> running the following query as an example to show how alike<span style="color: #800000;">&nbsp;"i%"</span> works to find "Invoice" type sales:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT Sales.RefNumber, Sales.BillAddressAddr1,Sales.Type, Sales.TxnDate FROM Sales <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where <span style="color: #003366;">{<span style="color: #000000;">fn LCASE</span></span>(Sales.Type)<span style="color: #003366;">} </span></span><span style="color: #800000; font-family: Arial, Helvetica, sans-serif;">LIKE 'i%'</span><span style="font-family: Arial, Helvetica, sans-serif;"> ORDER BY RefNumber</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/likeinvoicesales.JPG" alt="" width="633" height="398" /></span></p>
<p align="left"><span style="font-family: Arial, Helvetica, sans-serif;"> &nbsp;&nbsp;&nbsp;&nbsp; Another example is as follows:</span></p>
<p><span style="font-family: Arial, Helvetica, sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp; SELECT Name, CompanyName FROM Vendor Where Name LIKE 'Bay%'</span></p>
<p align="center"><span style="font-family: Arial, Helvetica, sans-serif;"><img src="oneadmin/_files/Image/Screen%20Dump%20Upload%20Folder/likeok.JPG" alt="" width="634" height="401" /></span></p>]]></content:encoded>
</item>
</channel>
</rss>