<?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-POS] Sample C#.NET Code for Creating SalesReceipt]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2951]]></link>
<guid isPermaLink="false"><![CDATA[02180771a9b609a26dcea07f272e141f]]></guid>
<pubDate><![CDATA[Tue, 29 Aug 2017 07:37:28 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Sample C#.NET Code for Creating Sales Receipt
 Sample Application:
Please click here&nbsp;to download the Sample Code.
Please refer to the steps below for using an application for creating a SalesReceipt using C#.NET.
I am connecting to the default D...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Sample C#.NET Code for Creating Sales Receipt</span></h2>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Sample Application:</span></h3>
<p>Please <a href="//support.flexquarters.com/esupport/newimages/SalesRcptC/QODBCPOS-SalesReceipt-Insert-Sample.zip">click here</a>&nbsp;to download the Sample Code.</p>
<p>Please refer to the steps below for using an application for creating a SalesReceipt using C#.NET.</p>
<p>I am connecting to the default DSN QuickBooks POS Data in this example. Run the application, select the DSN &amp; click on the "Connect" button. In this example. You can change DSN as per your configuration.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptC/step1.png" alt="" /></p>
<p>The application is connected with QuickBooks POS.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptC/step2.png" alt="" /></p>
<p>You need to insert CustomerListId, Comments, Cashier, SalesReceiptType, Item ListID, Quantity, Rate &amp; Amount, which you want to enter, and click on the "Insert New SalesReceiptItem" button.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptC/step3.png" alt="" /></p>
<p>New SalesReceipt created.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptC/step4.png" alt="" /></p>
<p>Result in QuickBooks POS.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptCW/step5.png" alt="" /></p>
<p><strong>Note:</strong> Modify/Append existing SalesReceipt feature is not supported by QuickBooks SDK, so it is unavailable through QODBC POS.</p>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Application Source Code:</span></h3>
<div style="background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;">
<pre style="margin: 0; line-height: 125%;"><span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Collections.Generic</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.ComponentModel</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Data</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Data.Odbc</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Drawing</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Linq</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Text</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Threading.Tasks</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Windows.Forms</span>;

<span style="color: #008800; font-weight: bold;">namespace</span> <span style="color: #0e84b5; font-weight: bold;">QODBC_SalesReceipt_Insert_Sample</span>
{
    <span style="color: #008800; font-weight: bold;">public</span> <span style="color: #008800; font-weight: bold;">partial</span> <span style="color: #008800; font-weight: bold;">class</span> <span style="color: #bb0066; font-weight: bold;">Form1</span> : Form
    {
        <span style="color: #008800; font-weight: bold;">private</span> OdbcConnection _cn;
        <span style="color: #008800; font-weight: bold;">public</span> <span style="color: #0066bb; font-weight: bold;">Form1</span>()
        {
            InitializeComponent();
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">Form1_Load</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
        {
            <span style="color: #008800; font-weight: bold;">try</span>
            {
                ListOutDSN();
                Application.DoEvents();
            }
            <span style="color: #008800; font-weight: bold;">catch</span> (Exception ex)
            {
                MessageBox.Show(<span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"Error - {0}, Stack Trace {1}"</span>, ex.Message, ex.StackTrace));
            }
            
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">ListOutDSN</span>()
        {
            cboListOfDSN.Items.Clear();

            <span style="color: #333399; font-weight: bold;">var</span> myODBCKeys = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(<span style="background-color: #fff0f0;">"SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources"</span>, <span style="color: #008800; font-weight: bold;">false</span>).GetValueNames();

            <span style="color: #008800; font-weight: bold;">foreach</span> (<span style="color: #333399; font-weight: bold;">var</span> item <span style="color: #008800; font-weight: bold;">in</span> myODBCKeys)
            {
                cboListOfDSN.Items.Add(item);
            }
            myODBCKeys = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(<span style="background-color: #fff0f0;">"SOFTWARE\\ODBC\\ODBC.INI\\ODBC Data Sources"</span>, <span style="color: #008800; font-weight: bold;">false</span>).GetValueNames();
            <span style="color: #008800; font-weight: bold;">foreach</span> (<span style="color: #333399; font-weight: bold;">var</span> item <span style="color: #008800; font-weight: bold;">in</span> myODBCKeys)
            {
                cboListOfDSN.Items.Add(item);
            }
            <span style="color: #888888;">//end of adding DSN to list</span>

            <span style="color: #008800; font-weight: bold;">if</span> (cboListOfDSN.Items.Count &gt; <span style="color: #6600ee; font-weight: bold;">0</span>)
            {
                <span style="color: #008800; font-weight: bold;">foreach</span> (<span style="color: #333399; font-weight: bold;">string</span> item <span style="color: #008800; font-weight: bold;">in</span> cboListOfDSN.Items)
                {
                    <span style="color: #008800; font-weight: bold;">if</span> (item == <span style="background-color: #fff0f0;">"QuickBooks Data"</span>)
                    {
                        cboListOfDSN.Text = item;
                        <span style="color: #008800; font-weight: bold;">return</span>;
                    }
                    <span style="color: #008800; font-weight: bold;">if</span> (item == <span style="background-color: #fff0f0;">"QuickBooks Data POS"</span>)
                    {
                        cboListOfDSN.Text = item;
                        <span style="color: #008800; font-weight: bold;">return</span>;
                    }
                    <span style="color: #008800; font-weight: bold;">if</span> (item == <span style="background-color: #fff0f0;">"QuickBooks Data Online"</span>)
                    {
                        cboListOfDSN.Text = item;
                        <span style="color: #008800; font-weight: bold;">return</span>;
                    }
                }
                cboListOfDSN.SelectedIndex = <span style="color: #6600ee; font-weight: bold;">0</span>;
            }



        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">btnConnect_Click</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
        {
            <span style="color: #008800; font-weight: bold;">try</span>
            {

                Application.DoEvents();
            <span style="color: #008800; font-weight: bold;">if</span> (btnConnect.Text == <span style="background-color: #fff0f0;">"Disconnect"</span>)
            {
                <span style="color: #008800; font-weight: bold;">if</span> (_cn != <span style="color: #008800; font-weight: bold;">null</span>)
                {
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Disconnecting...."</span>;
                    _cn.Close();
                    _cn.Dispose();
                    _cn = <span style="color: #008800; font-weight: bold;">null</span>;
                    btnConnect.Text = <span style="background-color: #fff0f0;">"Connect"</span>;
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Not Connected"</span>;
                    lblConnectionStatus.ForeColor = Color.DarkRed;
                }
            }
            <span style="color: #008800; font-weight: bold;">else</span>
            {
                <span style="color: #008800; font-weight: bold;">if</span> (_cn == <span style="color: #008800; font-weight: bold;">null</span> || _cn.State == ConnectionState.Closed)
                {
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Connecting...."</span>;
                    _cn = <span style="color: #008800; font-weight: bold;">new</span> OdbcConnection(<span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"DSN={0}"</span>, cboListOfDSN.Text));
                    _cn.ConnectionTimeout = <span style="color: #6600ee; font-weight: bold;">60</span>;
                    _cn.Open();
                    btnConnect.Text = <span style="background-color: #fff0f0;">"Disconnect"</span>;
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Connected"</span>;
                    lblConnectionStatus.ForeColor = Color.Green;
                }

            }
            Application.DoEvents();
            }
            <span style="color: #008800; font-weight: bold;">catch</span> (Exception ex)
            {
                Application.DoEvents();
                btnConnect.Text = <span style="background-color: #fff0f0;">"Errorred"</span>;
                MessageBox.Show(<span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"Error - {0}, Stack Trace {1}"</span>, ex.Message, ex.StackTrace));
            }

        }

    

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">DisplaySalesReceiptInGrid</span>(<span style="color: #333399; font-weight: bold;">string</span> customerListID)
        {
            <span style="color: #333399; font-weight: bold;">string</span> query = <span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"SELECT CustomerListId, Comments, Cashier, SalesReceiptType, SalesReceiptItemListId,  SalesReceiptItemQty as ItemQuantity, SalesReceiptItemPrice As ItemPrice, TenderCash01TenderAmount As TotalTenderAmount FROM SalesReceiptItem where TxnID='{0}'"</span>, customerListID);
            ProcessQuery(query);
        }

     


        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">InsertSalesReceiptLineItem</span>(<span style="color: #333399; font-weight: bold;">string</span> customerName, <span style="color: #333399; font-weight: bold;">string</span> comments, <span style="color: #333399; font-weight: bold;">string</span> cashierName, <span style="color: #333399; font-weight: bold;">string</span> salesReceiptType, <span style="color: #333399; font-weight: bold;">string</span> itemName, <span style="color: #333399; font-weight: bold;">int</span> quanity, <span style="color: #333399; font-weight: bold;">int</span> rate, <span style="color: #333399; font-weight: bold;">int</span> tenderAmount)
        {            
            <span style="color: #333399; font-weight: bold;">string</span> query =
                    <span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"Insert Into SalesReceiptItem (CustomerListId, Comments, Cashier, SalesReceiptType, SalesReceiptItemListId,  SalesReceiptItemQty, SalesReceiptItemPrice, TenderCash01TenderAmount) Values ('{0}','{1}','{2}','{3}','{4}',{5},{6},{7})"</span>,customerName,comments,cashierName,salesReceiptType,itemName,quanity,rate,tenderAmount);
                <span style="color: #888888;">//query = string.Format("Insert into invoiceline(txnid,InvoiceLineItemRefFullName, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineDesc) values('{0}','{1}',{2},{3},'{4}') ", txnID, itemFullName, quanity, rate, description);</span>
                <span style="color: #888888;">//MessageBox.Show(query);</span>
                <span style="color: #008800; font-weight: bold;">using</span> (OdbcCommand QBEmployeecmd = <span style="color: #008800; font-weight: bold;">new</span> OdbcCommand(query, _cn))
                {
                    <span style="color: #888888;">//MessageBox.Show("" + QBEmployeecmd.Connection.State.ToString());</span>
                    QBEmployeecmd.CommandType = CommandType.Text;
                    <span style="color: #888888;">//MessageBox.Show("" + QBEmployeecmd.CommandType.ToString());</span>
                    QBEmployeecmd.ExecuteNonQuery();
                    <span style="color: #888888;">//MessageBox.Show("Execute Success");</span>

                }
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">ProcessQuery</span>(<span style="color: #333399; font-weight: bold;">string</span> query)
        {
            <span style="color: #333399; font-weight: bold;">var</span> cmd = <span style="color: #008800; font-weight: bold;">new</span> OdbcCommand(query, _cn);            
            DataSet dataSet = <span style="color: #008800; font-weight: bold;">new</span> DataSet();            
            OdbcDataReader reader = cmd.ExecuteReader();            
            DataTable myTable = <span style="color: #008800; font-weight: bold;">new</span> DataTable();
            myTable.Load(reader);
            grvData.AutoGenerateColumns = <span style="color: #008800; font-weight: bold;">true</span>;
            grvData.DataSource = myTable;
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">Form1_FormClosing</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, FormClosingEventArgs e)
        {
            <span style="color: #008800; font-weight: bold;">if</span> (_cn != <span style="color: #008800; font-weight: bold;">null</span> &amp;&amp; _cn.State != ConnectionState.Closed)
            {
                _cn.Close();
            }
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">button1_Click</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
        {
            <span style="color: #008800; font-weight: bold;">this</span>.Close();
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">button2_Click</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
        {
           
           
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">btnSalesReceiptItem_Click</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
        {
            <span style="color: #008800; font-weight: bold;">try</span>
            {
                <span style="color: #008800; font-weight: bold;">if</span> (_cn == <span style="color: #008800; font-weight: bold;">null</span> || _cn.State == ConnectionState.Closed)
                {
                    btnConnect_Click(<span style="color: #008800; font-weight: bold;">null</span>, <span style="color: #008800; font-weight: bold;">null</span>);
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtcustomerName.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Customer Name is Required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtComments.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Comments is required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtCashierName.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Cashier Name is required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtSalesReceiptType.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Sales Receipt Type is required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtItemName.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Item Name is required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtQuantity.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Quantity is required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtItemPrice.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Item Price is required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtTenderAmount.Text))
                {
                    MessageBox.Show(<span style="background-color: #fff0f0;">"Tender Amount is required."</span>);
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                InsertSalesReceiptLineItem(txtcustomerName.Text, txtComments.Text, txtCashierName.Text, txtSalesReceiptType.Text, txtItemName.Text, <span style="color: #333399; font-weight: bold;">int</span>.Parse(txtQuantity.Text), <span style="color: #333399; font-weight: bold;">int</span>.Parse(txtItemPrice.Text), <span style="color: #333399; font-weight: bold;">int</span>.Parse(txtTenderAmount.Text));
                <span style="color: #333399; font-weight: bold;">string</span> lastInsertedId = GetLastInsertedId(<span style="background-color: #fff0f0;">"sp_lastInsertID SalesReceiptItem"</span>);
                DisplaySalesReceiptInGrid(lastInsertedId);
            }
            <span style="color: #008800; font-weight: bold;">catch</span> (Exception ex)
            {

                MessageBox.Show(<span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"Error - {0}, Stack Trace {1}"</span>, ex.Message, ex.StackTrace));
            }
        }
        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #333399; font-weight: bold;">string</span> <span style="color: #0066bb; font-weight: bold;">GetLastInsertedId</span>(<span style="color: #333399; font-weight: bold;">string</span> query)
        {
            <span style="color: #333399; font-weight: bold;">string</span> lastInsertedId = <span style="background-color: #fff0f0;">""</span>;
            <span style="color: #008800; font-weight: bold;">using</span> (OdbcCommand QBEmployeecmd = <span style="color: #008800; font-weight: bold;">new</span> OdbcCommand(query, _cn))
            {
                QBEmployeecmd.CommandType = CommandType.Text;
                <span style="color: #333399; font-weight: bold;">var</span> executedResult = QBEmployeecmd.ExecuteScalar();
                lastInsertedId = executedResult.ToString();               
            }
            <span style="color: #008800; font-weight: bold;">return</span> lastInsertedId;
        }

    }
}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-POS] Sample C#.NET Web Application for Creating SalesReceipt]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2950]]></link>
<guid isPermaLink="false"><![CDATA[bc4e356fee1972242c8f7eabf4dff517]]></guid>
<pubDate><![CDATA[Tue, 29 Aug 2017 07:31:37 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[ Sample C#.NET Web Application for Creating Sales Receipt
 Sample Application:
Please click here&nbsp;to download the Sample Code.
Please refer to the steps below for using an application for creating a SalesReceipt using C#.NET.
Run the application &...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Sample C#.NET Web Application for Creating Sales Receipt</span></h2>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Sample Application:</span></h3>
<p>Please <a href="//support.flexquarters.com/esupport/newimages/SalesRcptCW/QODBCPOS-SalesReceipt-Insert-Sample-ASP.zip">click here</a>&nbsp;to download the Sample Code.</p>
<p>Please refer to the steps below for using an application for creating a SalesReceipt using C#.NET.</p>
<p>Run the application &amp; click on the "Connect" button.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptCW/step1.png" alt="" /></p>
<p>The application is connected with QuickBooks POS.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptCW/step2.png" alt="" /></p>
<p>You need to insert CustomerListId, Comments, Cashier, SalesReceiptType, Item ListID, Quantity, Rate &amp; Amount, which you want to enter, and click on the "Insert New SalesReceiptItem" button.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptCW/step3.png" alt="" /></p>
<p>New SalesReceipt created.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptCW/step4.png" alt="" /></p>
<p>Result in QuickBooks POS.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/SalesRcptCW/step5.png" alt="" /></p>
<p><strong>Note:</strong> Modify/Append existing SalesReceipt feature is not supported by QuickBooks SDK, so it is unavailable through QODBC POS.</p>
<h3><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;"> Application Source Code:</span></h3>
<div style="background: #ffffff; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;">
<pre style="margin: 0; line-height: 125%;"><span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Collections.Generic</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Data</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Data.Odbc</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Drawing</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Linq</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Web</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Web.UI</span>;
<span style="color: #008800; font-weight: bold;">using</span> <span style="color: #0e84b5; font-weight: bold;">System.Web.UI.WebControls</span>;

<span style="color: #008800; font-weight: bold;">public</span> <span style="color: #008800; font-weight: bold;">partial</span> <span style="color: #008800; font-weight: bold;">class</span> <span style="color: #bb0066; font-weight: bold;">_Default</span> : Page
{
    <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">static</span> OdbcConnection _cn;
    <span style="color: #008800; font-weight: bold;">protected</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">Page_Load</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
    {
        <span style="color: #008800; font-weight: bold;">try</span>
        {           
            lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">false</span>;
        }
        <span style="color: #008800; font-weight: bold;">catch</span> (Exception)
        {

            <span style="color: #008800; font-weight: bold;">throw</span>;
        }
        <span style="color: #008800; font-weight: bold;">finally</span>
        {

        }
    }
    <span style="color: #008800; font-weight: bold;">protected</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">btnConnet_Click</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
    {
        <span style="color: #008800; font-weight: bold;">try</span>
        {
            <span style="color: #008800; font-weight: bold;">if</span> (btnConnect.Text == <span style="background-color: #fff0f0;">"Disconnect"</span>)
            {
                <span style="color: #008800; font-weight: bold;">if</span> (_cn != <span style="color: #008800; font-weight: bold;">null</span>)
                {
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Disconnecting...."</span>;
                    _cn.Close();
                    _cn.Dispose();
                    _cn = <span style="color: #008800; font-weight: bold;">null</span>;
                    btnConnect.Text = <span style="background-color: #fff0f0;">"Connect"</span>;
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Not Connected"</span>;
                    lblConnectionStatus.ForeColor = Color.DarkRed;
                }
            }
            <span style="color: #008800; font-weight: bold;">else</span>
            {
                <span style="color: #008800; font-weight: bold;">if</span> (_cn == <span style="color: #008800; font-weight: bold;">null</span> || _cn.State == ConnectionState.Closed)
                {
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Connecting...."</span>;
                    _cn = <span style="color: #008800; font-weight: bold;">new</span> OdbcConnection(<span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"DSN={0}"</span>, cboListOfDSN.Text));
                    _cn.ConnectionTimeout = <span style="color: #6600ee; font-weight: bold;">60</span>;
                    _cn.Open();
                    btnConnect.Text = <span style="background-color: #fff0f0;">"Disconnect"</span>;
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Connected"</span>;
                    lblConnectionStatus.ForeColor = Color.Green;
                }

            }

        }
        <span style="color: #008800; font-weight: bold;">catch</span> (Exception ex)
        {
            btnConnect.Text = <span style="background-color: #fff0f0;">"Errorred"</span>;
            lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"Errorred"</span>;
            lblErrorMessage.Text = <span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"Error - {0}, Stack Trace {1}"</span>, ex.Message, ex.StackTrace);
            lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;            
        }
    }  
    <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">InsertSalesReceiptLineItem</span>(<span style="color: #333399; font-weight: bold;">string</span> customerName, <span style="color: #333399; font-weight: bold;">string</span> comments, <span style="color: #333399; font-weight: bold;">string</span> cashierName, <span style="color: #333399; font-weight: bold;">string</span> salesReceiptType, <span style="color: #333399; font-weight: bold;">string</span> itemName, <span style="color: #333399; font-weight: bold;">int</span> quanity, <span style="color: #333399; font-weight: bold;">int</span> rate, <span style="color: #333399; font-weight: bold;">int</span> tenderAmount)
        {
            <span style="color: #333399; font-weight: bold;">string</span> lastInsrtedId = <span style="background-color: #fff0f0;">""</span>;
            <span style="color: #333399; font-weight: bold;">string</span> query = <span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"Insert Into SalesReceiptItem (CustomerListId, Comments, Cashier, SalesReceiptType, SalesReceiptItemListId,  SalesReceiptItemQty, SalesReceiptItemPrice, TenderCash01TenderAmount) Values ('{0}','{1}','{2}','{3}','{4}',{5},{6},{7})"</span>, customerName, comments, cashierName, salesReceiptType, itemName, quanity, rate, tenderAmount);
                <span style="color: #008800; font-weight: bold;">using</span> (OdbcCommand QBEmployeecmd = <span style="color: #008800; font-weight: bold;">new</span> OdbcCommand(query, _cn))
                {
                    QBEmployeecmd.CommandType = CommandType.Text;
                    QBEmployeecmd.ExecuteNonQuery();                    
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"SalesReceiptItem Insert Successfully"</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                }                
        }


        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">ProcessQuery</span>(<span style="color: #333399; font-weight: bold;">string</span> query)
        {
            <span style="color: #333399; font-weight: bold;">var</span> cmd = <span style="color: #008800; font-weight: bold;">new</span> OdbcCommand(query, _cn);            
            DataSet dataSet = <span style="color: #008800; font-weight: bold;">new</span> DataSet();            
            OdbcDataReader reader = cmd.ExecuteReader();
            DataTable myTable = <span style="color: #008800; font-weight: bold;">new</span> DataTable();
            myTable.Load(reader);
            grvData.AutoGenerateColumns = <span style="color: #008800; font-weight: bold;">true</span>;
            grvData.DataSource = myTable;
            grvData.BorderStyle = BorderStyle.Double;
            grvData.DataBind();
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">DisplaySalesReceiptInGrid</span>(<span style="color: #333399; font-weight: bold;">string</span> customerListID)
        {
            <span style="color: #333399; font-weight: bold;">string</span> query = <span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"SELECT CustomerListId, Comments, Cashier, SalesReceiptType, SalesReceiptItemListId, SalesReceiptItemDesc1,  SalesReceiptItemQty As ItemQuantity , SalesReceiptItemPrice As ItemPrice, TenderCash01TenderAmount as TenderTotalAmount FROM SalesReceiptItem where TxnID='{0}'"</span>, customerListID);
            ProcessQuery(query);
        }
        <span style="color: #008800; font-weight: bold;">protected</span> <span style="color: #008800; font-weight: bold;">void</span> <span style="color: #0066bb; font-weight: bold;">btnSalesReceiptItem_Click</span>(<span style="color: #333399; font-weight: bold;">object</span> sender, EventArgs e)
        {
            <span style="color: #008800; font-weight: bold;">try</span>
            {
                <span style="color: #008800; font-weight: bold;">if</span> (_cn == <span style="color: #008800; font-weight: bold;">null</span> || _cn.State == ConnectionState.Closed)
                {
                    btnConnet_Click(<span style="color: #008800; font-weight: bold;">null</span>, <span style="color: #008800; font-weight: bold;">null</span>);
                    btnConnect.Text = <span style="background-color: #fff0f0;">"Connect"</span>;
                    lblConnectionStatus.Text = <span style="background-color: #fff0f0;">"NotConnected"</span>;
                    lblConnectionStatus.ForeColor = Color.DarkRed;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtcustomerName.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Customer Name is Required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtComments.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Comments is required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtCashierName.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Cashier Name is required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtSalesReceiptType.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Sales Receipt Type is required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtItemName.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Item Name is required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtQuantity.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Quantity is required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtItemPrice.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Item Price is required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                <span style="color: #008800; font-weight: bold;">if</span> (<span style="color: #333399; font-weight: bold;">string</span>.IsNullOrEmpty(txtTenderAmount.Text))
                {
                    lblErrorMessage.Text = <span style="background-color: #fff0f0;">"Tender Amount is required."</span>;
                    lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
                    <span style="color: #008800; font-weight: bold;">return</span>;
                }
                InsertSalesReceiptLineItem(txtcustomerName.Text, txtComments.Text, txtCashierName.Text, txtSalesReceiptType.Text, txtItemName.Text, <span style="color: #333399; font-weight: bold;">int</span>.Parse(txtQuantity.Text), <span style="color: #333399; font-weight: bold;">int</span>.Parse(txtItemPrice.Text), <span style="color: #333399; font-weight: bold;">int</span>.Parse(txtTenderAmount.Text));
                <span style="color: #333399; font-weight: bold;">string</span> lastInsertedId = GetLastInsertedId(<span style="background-color: #fff0f0;">"sp_lastInsertID SalesReceiptItem"</span>);
                DisplaySalesReceiptInGrid(lastInsertedId);
            }
            <span style="color: #008800; font-weight: bold;">catch</span> (Exception ex)
            {
                lblErrorMessage.Text = <span style="color: #333399; font-weight: bold;">string</span>.Format(<span style="background-color: #fff0f0;">"Error - {0}, Stack Trace {1}"</span>, ex.Message, ex.StackTrace);
                lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
            }
        }

        <span style="color: #008800; font-weight: bold;">private</span> <span style="color: #333399; font-weight: bold;">string</span> <span style="color: #0066bb; font-weight: bold;">GetLastInsertedId</span>(<span style="color: #333399; font-weight: bold;">string</span> query)
        {
            <span style="color: #333399; font-weight: bold;">string</span> lastInsertedId = <span style="background-color: #fff0f0;">""</span>;
            <span style="color: #008800; font-weight: bold;">using</span> (OdbcCommand QBEmployeecmd = <span style="color: #008800; font-weight: bold;">new</span> OdbcCommand(query, _cn))
            {
                QBEmployeecmd.CommandType = CommandType.Text;
                <span style="color: #333399; font-weight: bold;">var</span> executedResult = QBEmployeecmd.ExecuteScalar();
                lastInsertedId = executedResult.ToString();
                lblErrorMessage.Text = <span style="background-color: #fff0f0;">"SalesReceiptItem Insert Successfully"</span>;
                lblErrorMessage.Visible = <span style="color: #008800; font-weight: bold;">true</span>;
            }
            <span style="color: #008800; font-weight: bold;">return</span> lastInsertedId;
        }
}
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-POS] Troubleshooting - Unable to connect to QuickBooks POS 2015 (12.0) using Office 365 / 2016]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2890]]></link>
<guid isPermaLink="false"><![CDATA[b4944963b5c83d545c3d3022bcf03282]]></guid>
<pubDate><![CDATA[Wed, 01 Mar 2017 13:36:00 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[Troubleshooting - Unable to connect to QuickBooks POS 2015 (12.0) using Office 365 / 2016&nbsp;
Problem Description:
I have QuickBooks POS 2015 (12.0) &amp; I want to connect to QuickBooks POS using MS Access/Excel. I am unable to connect to QBPOS with ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">Troubleshooting - Unable to connect to QuickBooks POS 2015 (12.0) using Office 365 / 2016&nbsp;</span></h2>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Problem Description:</span></span></h3>
<p>I have QuickBooks POS 2015 (12.0) &amp; I want to connect to QuickBooks POS using MS Access/Excel. I am unable to connect to QBPOS with Access and Excel 2016.</p>
<p>I am getting the following error:</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/POSSDK365/step1.png" alt="" /></p>
<p>Also, I am getting the error "Internal error 160000" in MS Access.</p>
<p>I can connect to QBPOS with the&nbsp;<strong>QODBC POS Test Tool</strong>.</p>
<p>Is there an issue with the most recent version of MS Office?</p>
<h3><span style="font-family: Arial,Helvetica,sans-serif;"><span style="color: #0066cc;">Solution:</span></span></h3>
<p>This is a known issue with QuickBooks POS SDK &amp; Office 2016, so Office 2016 cannot connect to QuickBooks POS using QuickBooks POS Data DSN.<br /><br />You can use QRemote DSN "QuickBooks POS Data QRemote" in MS Access/ Excel, which does not have this issue.</p>
<p>Please select QRemote DSN "QuickBooks POS Data QRemote" at the time of connection &amp; you will be able to connect to QuickBooks POS 2015 (12.0) using Office 365 / 2016.</p>
<p align="center"><img src="//support.flexquarters.com/esupport/newimages/POSSDK365/step2.png" alt="" /></p>
<p>Also, Refer:</p>
<p><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2858" target="_blank">Using QuickBooks POS Data with Access 2016 / 365 / 2013</a></p>
<p><a href="http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2859" target="_blank">Using QuickBooks POS Data with Excel 2016 / 365 / 2013</a></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-POS] Using QuickBooks POS Data with Excel 2016 / 365 / 2013]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2859]]></link>
<guid isPermaLink="false"><![CDATA[a226e450e214f350856e2980b6e55ac9]]></guid>
<pubDate><![CDATA[Thu, 10 Nov 2016 12:48:05 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How to Use QODBC POS with MS Excel 2016 / 365 / 2013
Set up QODBC to use with MS Excel
Note: QODBC allows you to quickly merge live QuickBooks data into the cells of your Microsoft Excel worksheets for quick calculations and graphs. The data will retain...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">How to Use QODBC POS with MS Excel 2016 / 365 / 2013</span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Set up QODBC to use with MS Excel</span></h3>
<p><strong>Note</strong>: QODBC allows you to quickly merge live QuickBooks data into the cells of your Microsoft Excel worksheets for quick calculations and graphs. The data will retain a live link to QuickBooks, and one click will update the worksheet to the most current data in the linked QuickBooks table.</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Before using the MS Excel application, please ensure you have installed the MS Office Component named "Microsoft Query." About MS Query, please refer to <a href="http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2352" target="_blank">Microsoft Office with MS Query and QODBC </a> for more. </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please start Microsoft Excel 2016/2013 from Windows Start-&gt;All Programs-&gt;Microsoft Office 2016 or Microsoft Office 2013:<br /><br />Note: In recent versions of Microsoft Excel (including Excel 365), the Microsoft Query (Legacy) feature is hidden by default from the Get Data tab.<br />Please refer to&nbsp;<a href="https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/3092" target="_blank">Troubleshooting - How to enable Microsoft Excel 365 - Legacy Microsoft Query</a>.</span></p>
<p style="text-align: left;"><strong><span style="font-family: Arial,Helvetica,sans-serif;">Office 2016: </span></strong><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSEX/step14.png" alt="" /></p>
<p style="text-align: left;"><strong><span style="font-family: Arial,Helvetica,sans-serif;">Office 2013: <img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSEX/Start%2520menu_2012-10-31_12-39-58.png" alt="" /></span></strong></p>
<p>&nbsp;</p>
<p style="text-align: left;"><strong><span style="font-family: Arial,Helvetica,sans-serif;">Office 2016: </span></strong><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSEX/step15.png" alt="" /></span></p>
<p><strong><span style="font-family: Arial,Helvetica,sans-serif;">Office 2013: <span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSEX/Opening%2520-%2520Microsoft%2520Excel_2012-10-31_12-41-01.png" alt="" /></span></span></strong></p>
<p>Create a blank workbook or can open an existing one. In this example, we are creating a new workbook:</p>
<p><img src="//support.flexquarters.com/esupport/newimages/POSEX/step18.png" alt="" width="824" height="651" /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">An Empty sheet will open, and you shall be on the "Home" tab: </span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><img src="//support.flexquarters.com/esupport/newimages/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_008.png" alt="" width="915" height="515" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Please select the "Data" tab and click "From Other Sources-&gt; From Microsoft Query." </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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_002.png" alt="" /></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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_003.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">It will take some time to get the DSN list: </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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_006.png" alt="" width="894" height="505" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">And then, in the "Choose Data Source" Window, please select a DSN to continue. </span>(Here, I choose the default data source with a sample company file open. And check to&nbsp;<strong>use the Query Wizard to create/edit queries</strong>.<span style="font-family: Arial,Helvetica,sans-serif;"><br />For 64-bit MS Office, changing QRemote DSN to <strong>"QuickBooks POS Data 64-bit"</strong> is the default DSN created when installing QODBC POS. </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/POSEX/Choose%2520Data%2520Source_2012-10-31_12-43-26.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The first time you use MS Excel to access QuickBooks, you will be asked to grant access permission for 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/POSEX/step19.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Select the "Yes, always" option to finish authorizing. </span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Import QuickBooks data into MS Excel via MS Query </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After you grant permission for QODBC, you will be guided by the Query Wizard. In the Choose Columns window, please select a table and the columns you want to input. Multiple selections are available. And once a table is set, it is the default that all its columns are set. You can add or remove columns from the correct list "Columns in your query." </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/POSEX/Query%252520Wizard%252520-%252520Choose%252520Columns_2012-10-31_12-.png" alt="" /></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/POSEX/Query%252520Wizard%252520-%252520Choose%252520Columns_2012-10-31_002.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">You can set a filter for your query in this window. If you don't want to set any query, please click the "Next" 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/POSEX/Query%252520Wizard%252520-%252520Filter%252520Data_2012-10-31_12-47-.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">This window allows you to sort your data. If you don't want to change the order, please click the "Next" 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/POSEX/Query%252520Wizard%252520-%252520Sort%252520Order_2012-10-31_12-47-2.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After the setup is finished, MS Excel will ask you to choose an edit method for the records: </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/POSEX/Query%2520Wizard%2520-%2520Finish_2012-10-31_12-51-24.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Return Data to Microsoft Excel:</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> This method will directly export the data to Excel, where you can view and edit these records, but the data is static. The modification will not be uploaded to QuickBooks. </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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_007.png" alt="" width="918" height="518" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> You can view the detailed connection properties by clicking the "connection" button in the Data menu: </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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-31_1.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> In the Workbook Connection Window, click the "Properties" button to view detailed information: </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/POSEX/Workbook%2520Connections_2012-10-31_12-48-53.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Now you can view the connection string and its SQL statement in the definition window: </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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_005.png" alt="" /></span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">View Data or Edit Query in MS Query :</span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> This method will lead you to the MS Query window, and you can view and edit data via SQL Statement there, and all modifications will be uploaded to QuickBooks.</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/POSEX/Microsoft%2520Query_2012-10-31_12-51-31.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"> Click the "SQL" button to view the SQL Statement of this query. </span><span style="font-family: Arial,Helvetica,sans-serif;">The SQL window will show the SQL Statement, and the user can also modify the statement to extract other records: </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/POSEX/Microsoft%2520Query_2012-10-31_12-51-42.png" alt="" /></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The desired record set contains only the records with a <strong>Name</strong> having a value equaling "Residential." Select the field header name and click on it, followed by selecting <strong>Criteria</strong> -&gt; <strong>Add Criteria</strong>. In the popped-out Add Criteria window, specify the criteria <strong>Field</strong> as "Name," <strong>Operator</strong> as "equals," then click the&nbsp;<strong>Value</strong> button and from the list of values, select "Residential" -&gt; <strong>OK</strong> -&gt; <strong>Add</strong>.</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSEX/Excel8.jpg" alt="" width="482" height="236" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSEX/Excel9.jpg" alt="" /></p>
<p class="style3">&nbsp;</p>
<p class="style3">The following screen reflects the applied criteria to the query and the resulting QuickBooks recordset:</p>
<p>&nbsp;<img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSEX/Excel10.jpg" alt="" /></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">When you finish the query, choose to save it so that the next time you can directly use it. Leaving MS Query, MS Excel will ask you to import the query result into MS Excel:</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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_004.png" alt="" /></span></p>
<p>&nbsp;</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/POSEX/Book1%252520-%252520Microsoft%252520Excel%252520Preview_2012-10-_007.png" alt="" width="1595" height="475" /></span></p>
<p>&nbsp;</p>
<p><br />&nbsp;&nbsp;&nbsp;&nbsp; Clicking <strong>Data</strong> -&gt; <strong>Refresh Data</strong> or clicking the External Data toolbar will update the data in the worksheet from the latest information in the linked QuickBooks tables, as shown above. Changes to the QuickBooks files will not affect this worksheet until you refresh the data with the Refresh option.</p>
<p>Keywords:&nbsp;create odbc connection,&nbsp;Office 2013, Office 365, Excel 365, Access 365, Office 2016, Access 2016, Excel 2016</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[[QODBC-POS] Using QuickBooks POS Data with Access 2016 / 365 / 2013]]></title>
<link><![CDATA[https://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2858]]></link>
<guid isPermaLink="false"><![CDATA[42a6845a557bef704ad8ac9cb4461d43]]></guid>
<pubDate><![CDATA[Thu, 10 Nov 2016 12:14:02 +0000]]></pubDate>
<dc:creator />
<description><![CDATA[How to Use QODBC POS with MS Access 2016 / 365 / 2013
Creating a Table in Microsoft Access:
Note: Microsoft Access has many uses and will allow you to use your QuickBooks data files similarly to Access databases.
Open MS Access 2016/2013. You can find ...]]></description>
<content:encoded><![CDATA[<h2><span style="color: #6633cc; font-family: Arial,Helvetica,sans-serif;">How to Use QODBC POS with MS Access 2016 / 365 / 2013</span></h2>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Creating a Table in Microsoft Access:</span></h3>
<p><strong>Note</strong>: Microsoft Access has many uses and will allow you to use your QuickBooks data files similarly to Access databases.</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Open MS Access 2016/2013. You can find it via Windows Start-&gt;All Programs-&gt;Microsoft Office 2016/2013: </span></p>
<p style="text-align: left;"><strong><span style="font-family: Arial,Helvetica,sans-serif;">Office 2016: </span></strong><span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSACC/step16.png" alt="" /></span></p>
<p style="text-align: left;"><strong><span style="font-family: Arial,Helvetica,sans-serif;">Office 2013:<span style="font-family: Arial,Helvetica,sans-serif;"><img style="display: block; margin-left: auto; margin-right: auto;" src="//support.flexquarters.com/esupport/newimages/POSACC/Start%2520menu_2012-10-31_12-39-58.png" alt="" /></span></span></strong></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/POSACC/step19.png" alt="" width="822" height="651" /></span></p>
<p>A default database filename, Database1, appears in the box. You can edit this to a more relevant name, such as QuickBooks Link. accdb. Save the file as type "Microsoft Office Access Databases."</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;">&nbsp;</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/POSACC/step20.png" alt="" width="620" height="506" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After&nbsp; the new database is created, navigate to "External Data": </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/POSACC/Microsoft%252520Access%252520Preview%252520-%252520Database2%25252_004.png" alt="" width="884" height="512" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Build a connection via External Data-&gt;More-&gt;ODBC Database, or directly click the ODBC database button on the External Data menu:</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/POSACC/Microsoft%252520Access%252520Preview%252520-%252520Database2%25252_002.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Under the Get External Data window, you will get two options:</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/POSACC/Get%252520External%252520Data%252520-%252520ODBC%252520Database_2012-1.png" alt="" /></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;"><strong>Link to the data source by creating a linked table:</strong> this option will create a table just like the first option, but will keep its connection to QuickBooks, which means all your operations to this table will be uploaded to QuickBooks, and the data in the table is also in full sync with QuickBooks.</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">This article will show you how to build a linked table in MS Access. </span></p>
<h3><span style="color: #0066cc; font-family: Arial,Helvetica,sans-serif;">Build a Linked Table in MS Access </span></h3>
<p><span style="font-family: Arial,Helvetica,sans-serif;">After you select the access method and click OK, you will get a Select Data Source window:</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/POSACC/Select%2520Data%2520Source_2012-10-31_12-55-01.png" alt="" /></span></p>
<p>Select the QuickBooks-related DSN you set up with the QODBC driver. This can be one of our pre-installed DSN names or one that you have created. (Here, I choose the default DSN as an example.)<br />For 64-bit MS Office, changing QRemote DSN to <strong>"QuickBooks POS Data 64-bit"</strong> is the default DSN created when installing QODBC POS.</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The first time you use MS Access to access QuickBooks, it will ask you to grant permission for this application:</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/POSACC/step15.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Select the "Yes, Always" option, and then click "Done" in the next window:</span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Once the connection is built, Access will return a list of available tables in the Select Tables window. Please select the tables you want to extract data from. Multiple Selection is available. </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/POSACC/Import%2520Objects_2012-10-31_12-55-49.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">If the Import/Linking works without any problems, you will see linked tables being created in the table list of MS Access: </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/POSACC/Microsoft%252520Access%252520Preview%252520-%252520Database2%25252_003.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">If you want to view QuickBooks records in this linked table, double-click the linked server, and you will see the records: </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/POSACC/Microsoft%252520Access%252520Preview%252520-%252520Database2%252520%2525.png" alt="" /></span></p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">The linked table is always in sync with QuickBooks Data, so you cannot add or delete any columns in this table. But you can directly modify the data in the linked table, and QODBC will automatically update the modification to QuickBooks. </span></p>
<p><strong>Note: When</strong>&nbsp;you run across an application that is not fully ODBC compatible, they often support getting data from Access tables. To make this application work with QuickBooks tables, you can run the Microsoft Access setup, as shown above. Then have this application use the MS Access ODBC driver to talk to the Access database you created, which was linked to QuickBooks tables. This middleware approach allows us to support nearly any application, even if not fully ODBC compliant.</p>
<p>&nbsp;</p>
<p><span style="font-family: Arial,Helvetica,sans-serif;">Suppose you want to import a table into MS Access. In that case, you have to select<strong> Import the source data into a new table in the current database </strong>option instead of&nbsp;<strong><strong>linking to the data source by creating a linked table&nbsp;</strong></strong>&amp; repeat the above steps<strong>:</strong> this option will directly extract tables into Access Database, you can view and edit these tables, but all modification will not be uploaded unless you build another query to do so.</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/POSACC/step13.png" alt="" /></span></p>
<p>&nbsp;</p>
<p>Keywords:&nbsp;read/write with MS Access,&nbsp;Office 2013, Office 365, Excel 365, Access 365, Office 2016, Access 2016, Excel 2016</p>]]></content:encoded>
</item>
</channel>
</rss>