Quantcast
Channel: FLEXquarters.com Limited
Viewing all 313 articles
Browse latest View live

How to Import data to QuickBooks through CSV using QODBC

$
0
0

How to Import data to QuickBooks through CSV using QODBC

Note: QODBC does not support direct import, But you can write VBA code which reads a CSV / Excel file & generates insert statements.

Please refer Using QuickBooks Data with VBA

In this tutorial, we are showing sample VBA script which is inserting Customer & Invoice.

1. Importing Customer to QuickBooks through CSV file using QODBC

We have Customer CSV file which has Customer Name,CompanyName,Phone & Email fields.

We will import this fields to QuickBooks using VBA. You can see below records from Customer CSV file.

.

 

Please refer below sample VBA code for Importing Customer to QuickBooks through CSV file using QODBC.

By clicking on "Add Customer" button, Customer list in CSV file will be Imported into QuickBooks using QODBC.

 

Please Note: You need to change CSV file location & VBA script according to your CSV file location & file data.

Please refer below code which is use in this example:

Import Customer:

 

Option Compare Database

Public Sub exampleCsvImportCustomer()

Dim oConnection As New ADODB.Connection
Dim sConnectString
Dim MyArray As Variant
Dim fso As Variant
Dim objStream As Variant
Dim objFile As Variant
Dim sSQL As String
Dim sMsg
Dim rs
Dim i As Integer
i = 0
sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"
sSQL = "SELECT * FROM customer"

Set rs = New ADODB.Recordset
oConnection.Open (sConnectString)
rs.Open sSQL, oConnection, adOpenDynamic, adLockOptimistic

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FileExists("C:\Input\Customer.csv") Then
Set objStream = fso.OpenTextFile("C:\Input\Customer.csv", 1, False, 0)
End If

Do While Not objStream.AtEndOfStream
strLine = objStream.ReadLine
ReDim MyArray(0)
MyArray = Split(strLine, ",")
rs.AddNew
rs("Name") = MyArray(0)
rs("CompanyName") = MyArray(1)
rs("Phone") = MyArray(2)
rs("Email") = MyArray(3)
rs.Update
i = i + 1

Loop

sMsg = sMsg & "Customer Added!!!"
MsgBox sMsg

End Sub

2. Importing Invoice to QuickBooks through CSV file using QODBC

We have Invoice CSV file which have CustomerRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineQuantity, InvoiceLineSalesTaxCodeRefListID & FQSaveToCache fields.

We will import this fields to QuickBooks using VBA. In this example, we are creating two Invoice each having 3 InvoiceLine. You can see below records from Invoice CSV file.

Please refer below sample VBA code for Importing Invoice to QuickBooks through CSV file using QODBC.

By clicking on "Add Invoice" button, Invoice list in CSV file will be Imported into QuickBooks using QODBC.

 

Please Note: You need to change CSV file location & VBA script according to your CSV file location & file data.

Please refer below code which is use in this example:

Import Invoice:

 

Option Compare Database

Public Sub exampleCsvImportInvoice()
Dim oConnection As New ADODB.Connection
Dim sConnectString
Dim MyArray As Variant
Dim fso As Variant
Dim objStream As Variant
Dim objFile As Variant
Dim sSQL As String
Dim rs
Dim sMsg
Dim i As Integer
i = 0

sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;"
sSQL = "SELECT * FROM InvoiceLine"

Set rs = New ADODB.Recordset
oConnection.Open (sConnectString)
rs.Open sSQL, oConnection, adOpenDynamic, adLockOptimistic

Set fso = CreateObject("Scripting.FileSystemObject")

If fso.FileExists("C:\Input\Invoice.csv") Then
Set objStream = fso.OpenTextFile("C:\Input\Invoice.csv", 1, False, 0)
End If

Do While Not objStream.AtEndOfStream
strLine = objStream.ReadLine
ReDim MyArray(0)
MyArray = Split(strLine, ",")
rs.AddNew
rs("CustomerRefListID") = MyArray(0)
rs("RefNumber") = MyArray(1)
rs("InvoiceLineItemRefListID") = MyArray(2)
rs("InvoiceLineDesc") = MyArray(3)
rs("InvoiceLineRate") = MyArray(4)
rs("InvoiceLineQuantity") = MyArray(5)
rs("InvoiceLineSalesTaxCodeRefListID") = MyArray(6)
rs("FQSaveToCache") = MyArray(7)
rs.Update
i = i + 1

Loop

sMsg = sMsg & "Invoice Added!!!"
MsgBox sMsg

End Sub

 

Download Sample


How to create or configure a QODBC Online DSN

$
0
0

How to create or configure a QODBC Online DSN

Problem Description:

I have one Quickbooks Online login, which provides access to multiple Quickbooks Online companies.

When I initially configured the connection, I selected one of the clients that I have access to (Company A). The connection worked great and I got the data I needed. Now I want to export data for another client of mine (Company B), but I’m not sure how to reconfigure to pull from their database and not Company A's.

 

Solution:

You can create new DSN company wise & authorize your company file and use it in your configuration.

For Example, Create New DSN for Company A & use Company A's DSN for accessing Company A's data.

Same way you can create DSN for Company B & use Company B's DSN for accessing Company B's data.

You can repeat this for multiple company files.

Please refer below example which is showing creating QODBC Online DSN company wise.

Launch QODBC Online Data Source Configuration

      Locate the QODBC Driver for QuickBooks Online program group on your desktop. Click on the Configure QODBC Online Data Source icon to create or configure a QODBC Online Data Source Name (DSN).

Create A New DSN

      Click on the System DSN tab to create a DSN that can be called by both Windows applications and services. Click on the Add button to create a new DSN.

       Select the QODBC Driver for QuickBooks Online option and click on the Finish button.

Configure The Created DSN

      Enter the Data Source Name as CompanyA and click Apply.

Click Connect To QuickBooks

You need to authorize your company file to work with QODBC Online.

During the authorization select your Company file.

 

Please refer How to Connect QODBC Online with QuickBooks Online Edition for more details

Once it is connected, You can use Excel or Access or VB Demo or any other application, and use "CompanyA" instead of "QuickBooks Online Data" and you should be able to connect and fetch data from QuickBooks Online. .

You can repeat above steps for another company file (i.e. CompanyB,CompanyC etc..).

Foreign and Unicode characters not supported by QODBC

$
0
0

Foreign and Unicode characters not supported by QODBC

Information:

Evidently QuickBooks allows users to put foreign (ie Chinese, Japanese, etc...) characters into item descriptions, etc... Unfortunately, these characters are not returned properly in qbXML responses (and, therefore, QODBC responses since they're based on Intuit's qbXML SDK.)

The problem is two-fold. At the SDK level, the Intuit code wasn't written to handle Unicode characters, so any characters QuickBooks returns to the SDK level aren't interpreted properly. Secondly the parser used by the SDK runtime in QuickBooks doesn't support some of the character sets for foreign characters, so even if the underlying SDK runtime code handled Unicode characters, the SDK parser wouldn't. That means one cannot currently pass foreign characters into QuickBooks through the SDK to QODBC.

Troubleshooting - How to stop any query on VB Demo Application

$
0
0

Troubleshooting - How to stop any query on VB Demo Application

Problem Description:

How to Stop any query on VBDEMO when it takes time.

How to convert the date into QuickBooks date.

I want to insert txndate in ReceivePayment table; but it pop up the operator and operand error.

I am just inserting values in ReceivePayment Table. My Query is:

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)

I am looking for your early reply with thanks.

 

Solution:

You can stop query execution by clicking "Stop Query" from QODBC Icon on the system tray. Right click on QODBC Icon in the system tray and click on "Stop Query" and 5 or 10 minutes.



If 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:





QODBC uses the standard SQL date format: {d'YYYY-MM-DD'}, You will get Invalid operand for operator error when you provide wrong data type values in your query. Please refer Troubleshooting - [QODBC] Invalid operand for operator

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)

Troubleshooting - How to COMPUTE sum without COMPUTE clause

$
0
0

Troubleshooting - How to COMPUTE sum without COMPUTE clause

Problem Description:

The following select gives me the right data using DISTINCT, but then how do I get a sum of it, which is what I need?

select distinct billtopayduedate, billtopayrefnumber,bill.vendorreffullname, billtopayamountdue, assetaccountreffullname from bill nosync, billtopay nosync, billitemline nosync, item nosync where billtopay.billtopaytxnid = bill.txnid and bill.ispaid=false and bill.txnid = billitemline.txnid and BillItemLine.ItemLineItemRefListID = Item.ListID and assetaccountreffullname like '%inventory%'

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 expenseline or itemline is for inventory

 

Solution:

In SQL we do sum(column) and group by, for example:

SELECT Employee.PayrollInfoClassRefFullName, sum(Transaction.Amount) as Amount FROM Transaction, Employee where Transaction.EntityRefListID=Employee.ListID and Transaction.TxnType='Paycheck' and (Transaction.TxnDate >= {d'2017-01-01'} and Transaction.TxnDate < {d'2018-01-01'}) Group by Employee.PayrollInfoClassRefFullName

To total all the BillToPay amounts you simply do:

Select sum(BillToPayAmountDue) as OpenAPBalance from BillToPay

To total all the BillToPay amounts involving stock (inventory) only and not expenses you simply do:

Select sum(BillToPayAmountDue) as OpenInvtBalance from BillToPay, BillItemLine where BillToPay.BillToPayTxnID = BillItemLine.TxnID and BillItemLine.ItemLineSeqNo = 1

Troubleshooting - How do I void an Invoice?

$
0
0

Troubleshooting - How do I void an Invoice?

Problem Description:

How do I void an Invoice? and How do I query for invoices that have been voided? I don't see any kind of indicator in the Invoice table.

 

Solution:

You can use SP_VOID just like you would use DELETE. It will void the invoice instead of deleting it.

For Example:

SP_VOID FROM Invoice WHERE TxnID = '1B03F-1513346399'



You can use below query to get a list of Voided Invoice.

select RefNumber, CustomerRefFullName, Memo from Invoice WHERE Memo like 'VOID:%'

If no InvoiceLines are returned you can resync your optimized InvoiceLine table by running:



Troubleshooting - How do I get Time frame information - Sales by ...

$
0
0

Troubleshooting - How do I get Time frame 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 start working with QODBC to get the information we can't get easily from QuickBooks reports. What I would like to ask people working with QODBC and QB and QB POS is if QODBC is able to 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 on the QB or the QB POS file. If someone could tell me If I could I access this type information, I could start working with QODBC. I would appreciate any help.

 

Solution:

You can use below query to get Time frame information using QODBC

For Example:

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 >= {d'2007-12-01'} and TxnDate <={d'2007-12-31'}) and {fn CONVERT( {fn HOUR(TimeCreated)}, SQL_VARCHAR)} = '22' and SalesLineType='Item' and SalesLineItemRefFullName is not null and SalesLineQuantity > 0 order by SalesLineQuantity DESC, SalesLineItemRefFullName



Where '22' is the hour using 24 hour format.
(TxnDate >= {d'2007-12-01'} and TxnDate <={d'2007-12-31'}) is the start and end date for the report

Troubleshooting - How do I delete orphaned InvoiceLine records?

$
0
0

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 supplied from a list before running the DELETE command.

However, no records are deleted. What am I doing wrong?

 

Solution:

The first step is to actually check that there are orphaned InvoiceLines. I would hazard to guess that you have orphaned optimized InvoiceLines only and no real orphaned InvoiceLines in QuickBooks. Run the following query with the unoptimized tag using VB Demo:-

SELECT TxnID, InvoiceLineTxnLineID, InvoiceLineDesc, InvoiceLineAmount, RefNumber FROM InvoiceLine unoptimized where RefNumber = 'yourrefnumber'

where 'yourrefnumber' is the Reference for the Invoice.

If no InvoiceLines are returned you can resync your optimized InvoiceLine table by running:

sp_optimizefullsync InvoiceLine


Troubleshooting - How can I get daily Bill Payment information?

$
0
0

Troubleshooting - How can I get daily Bill Payment information?

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 this details?

 

Solution:

You can use below query to get details about daily Bill Payment information.

For Example:

SELECT DueDate, VendorRefFullName as Vendor, RefNumber as Ref, AmountDue as "Amt. Due" FROM Bill where IsPaid = 0 and DueDate <= {d'2007-12-25'} order by DueDate



Or You can go straight to the BillToPay table like this

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 <= {d'2007-12-25'} order by BillToPay.BillToPayDueDate



Troubleshooting - How can I Get all the Records for a specified Y...

$
0
0

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 Invoice WHERE CustomerRefListID = 'some customer ID' AND IsPaid AND TimeCreated BETWEEN date1 AND date2

 

Solution:

You can use below query to get details about records for a specified Year.

For Example:

Select * from Invoice where {fn YEAR(TxnDate)} = 2017

For more details Refer: How are dates formatted in SQL queries when using the QuickBooks generated time stamps

Troubleshooting - How can I change the pricing and quantity of It...

$
0
0

Troubleshooting - How can I change the pricing and quantity of Items in a ItemGroup?

Problem Description:

How can I change the price of each individual item in a group? Is it possible? If yes please give me an example.

Solution:

The price of an item within an ItemGroup is determined by the ItemInventory, ItemService, ItemOtherCharge item itself. The price of an ItemService item can be done using standard UPDATE statements, for example:

For Example:

Update ItemService Set SalesOrPurchasePrice=40 where Name='Floor Plans'

You cannot change the price or quantity of individual item group lines within an Invoice. If you want to 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.

Troubleshooting - Expenses written to BillExpenseLine are not sho...

$
0
0

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 using the following stored procedure "sp_columns" command in VB Demo:

sp_columns BillExpenseLine

shows the: ExpenseLineBillableStatus valid values as: |Billable|NotBillable|HasBeenBilled|

However the following insert failed:-

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)

with an "Insert on a linked table "BillExpenseLine' failed" error.

 

Solution:

In order for the Billable, NotBillable, and HasBeenBilled flag to be used on a Bill Expense Line within QuickBooks, a Customer Job "ExpenseLineCustomerRefListID" must also be assigned.

To create a BillExpenseLine with a "Billable" status using two SQL insert statements:

Statement 1

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)

Statement 2

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')

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. In the sequence above, you should note that the value of "FQSaveToCache" is set to 1 (true) in the first statement.

A true (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.

Note: The BillExpenseLine.ExpenseLineAccountRefListID must be an asset type, you cannot use a COGS (cost of goods sold) type account.

How do I create a Purchase Order using a Item Group using QODBC?

$
0
0

An Example of PurchaseOrder Item Groups

Create an ItemGroup with Three Lines

Note: Let's start by creating 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" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 1', 1, 'Test Item Desc', 1, '100000-933272656', 1.0, 1)


Note: 
 VB DEMO is to be used for testing of QODBC SQL queries only and is not a development tool.

 

Second Line

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 2', 1, 'Test Item Desc', 1, '110000-933272656', 2.0, 1)

Third (Last) Line

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 3', 1, 'Test Item Desc', 1, '1C0000-933272656', 3.0, 0)

Result in QuickBooks

The result looks like this in QuickBooks 2013:

 

For more about creating ItemGroups, please see: How to create Item Groups using QODBC.

Locate the List ID of the New ItemGroup

To locate the ListID of the new Item Group (or any group), simply do:

SELECT ListID, Name, ItemDesc, IsActive FROM ItemGroup

Invoice the ItemGroup

 

Note: We can now create PurchaseOrder using the item group by using the ListID:'80000062-1513335790' and doing one simple QODBC insert statement below.

 

INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
"PurchaseOrderLineGroupItemGroupRefListID","FQSaveToCache")
VALUES ('800000B4-1197779815', 'Group2', '80000062-1513335790', 0)

Result in QuickBooks

When we look at the new invoice in QuickBooks 2013 we will see:

Note: Qty, Rate and the Amount are shown as per Qty, Rate and the Amount for the service or stock item

 

Troubleshooting - How Do I List the Subtotal of Invoices Within D...

$
0
0

Troubleshooting - How Do I List the Subtotal of Invoices Within Date Range

Problem Description:

I would like to do is list find 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.

What QODBC SQL Statement would I use?

This is what I have so far:

SELECT SUM(Subtotal) AS gt FROM Invoice WHERE CustomerRefListId='30000-1166980720' AND (TxnDate>={d'2006-12-24'} AND TxnDate<={d'2007-01-23'})

But that will only get me the subtotal of invoices for the main customer, but it doesn't get me the combined subtotal of all the invoices for each job under that customer as well.

Is there a way to combine it all in one SQL Statement? Or do I have to use multiple statements then manually combine all the totals together?

 

Solution:

You can use below query to get Subtotal of Invoices Within Date Range using QODBC.

You can run this query:

SELECT Invoice.CustomerRefFullName, Sum(Invoice.SubTotal) AS SumOfSubTotal FROM Invoice WHERE (((Invoice.TxnDate)>={d'2007-01-01'})) and (((Invoice.TxnDate)<{d'2007-12-01'})) GROUP BY Invoice.CustomerRefFullName



You can change the greater than or equal (>=) and the less than (<) dates to the date range you wish to use.


If you want to get SubTotal of all Invoices for Customer 2 and all the Customer 2 Jobs combined, then I would 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:

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'

How to connect to QODBC using Python

$
0
0

How to connect to QODBC using Python

Download Sample

Sample Code for using QODBC DSN:

import pyodbc

cn = pyodbc.connect('DSN=QuickBooks Data;')

cursor = cn.cursor()

cursor.execute("SELECT Top 10 Name FROM Customer")

for row in cursor.fetchall():

print (row)

cursor.close()

cn.close()

 

 

 

QODBC Configuration:

Turn on "Simulate Transaction support for SQL Server" option 

 

Script execution & Result in Command Prompt:

Navigate to your Python script folder:


Run your Python script:

 


Result:

 


Troubleshooting:

If you receive an error  [QODBC] Driver Not Capable when using "QuickBooks Data" DSN

To resolve this error you need to enable "Simulate Transaction support for SQL Server" option from:

Start>>All Programs>> QODBC Driver for use with QuickBooks>> Configure QODBC Data Source>>Go To "System DSN" Tab>> select QuickBooks Data>> click "configure">> switch to Advanced tab>> enable "Simulate Transaction support for SQL Server" option.

 

After enabling above option you can use "QuickBooks Data" DSN in python script.



 

 

Sample Code for using QRemote DSN:

import pyodbc

cn = pyodbc.connect('DSN=QuickBooks Data QRemote;')

cursor = cn.cursor()

cursor.execute("SELECT Top 10 Name FROM Customer")

for row in cursor.fetchall():

print (row)

cursor.close()

cn.close()


Please refer: How to configure QRemote

 

Please Note: If you have 64-bit application, then you need to use QRemote 64-bit DSN "QuickBooks Data 64-Bit QRemote"

Script execution & Result in Command Prompt:

Navigate to your Python script folder:


Run your Python script:


Result:


Troubleshooting - Cannot connect to my QuickBooks Online Sandbox

$
0
0

Troubleshooting - Cannot connect to my QuickBooks Online Sandbox

Problem Description:

I am trying to do some testing and now have access to a QBO Sandbox company. I have tried to connect to it two different ways.

1. If I "Connect to QuickBooks" on the QODBC Driver for QuickBooks Online Setup Screen without checking the "Sandbox Company" checkbox, I can connect to QBO, but cannot see any data from my QBO Sandbox company.

2. If I "Connect to QuickBooks" on the QODBC Driver for QuickBooks Online Setup Screen with the "Sandbox Company" checkbox checked, it goes through the QBO login screen and presents the Authorize button on the next screen. When I click on Authorize, it closes that screen and opens a new one which also requests Authorize. When I click Authorize on that screen too, it then reports "Connection Complete", but it never loads the Access Token and the "Connect to QuickBooks" button does not toggle to "Disconnect from QuickBooks." When I try to access my Sandbox Company tables using VBDemo, I get the error message shown in the attached file named "Error Message".

I am getting below error:





Also, I have noticed below entries in QODBCOL.log files:

Begin Session Failed. S0000 00000 [QODBC] QB Begin Session Failed. 658 - Access Token Not Found. Goto [QODBC Online Setup Screen] and Click [Test Connection to QuickBooks Online], Please Authorize QODBC Online to connect to Your QuickBooks Online Company.

Please advise on correct process to connect to the Sandbox Company from QODBC.

 

Solution:

There might be some issue at Intuit authorization service. Please wait for 30 minutes and try again, you should able to connect to Sandbox company file.

How to connect to QuickBooks Online Sandbox.

$
0
0

How to connect to QuickBooks Online Sandbox.

For installation & configuring QODBC Online to work with QuickBooks Online live company file. Please refer:

How to use QODBC Online with QuickBooks Online Edition (Apps.com)

Configure QODBC Online to work with Sandbox company file:

You need to authorize & configure QODBC Online to work with QuickBooks Online Sandbox company.

Please follow below steps configure QODBC Online:

1) Open QODBC Online Setup Screen & click on "Connect To QuickBooks" & refer below steps by step guide:

Start>>All Programs>> QODBC Driver for use with QuickBooks Online>> Configure QODBC Data Source>> Go To "System DSN" Tab>> select QuickBooks Online Data>> click "configure">> switch to General tab

Enable Sandbox Company (for testing only) option & click on "Connect To QuickBooks" button.



2) By clicking "Connect To QuickBooks" open authorization screen. You need to authorize your company file to work with QODBC Online.



3) You need to enable popup.



4) Enter your QuickBooks User ID & Password, then click on "Sign In"



5) Select sandbox company file which you want to use with QODBC Online. If you have multiple company files.



6) Click on "Authorize"





7) After successful authorization, it will return back to QODBC Online page as connected status. You can close this window.



8) QODBC Online is successfully connected to your QuickBooks Online Sandbox company.





9) Now we are testing connection through VB Demo application. Please open VB Demo from:

Start>>All Programs>> QODBC Driver for use with QuickBooks Online>> VB Demo:

Click on Connection "Add New Connection"



10) Select "QuickBooks Online Data" & click on "OK":



11) Now you can see we are connected to QuickBooks Online Sandbox. Now we are querying Customer table:



Below are the list of Customers:



Troubleshooting - Invoice Line Rate is not loading into QBO

$
0
0

Troubleshooting - Invoice Line Rate is not loading into QBO

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 create the invoice.

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)

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'})

 

Solution:

QODBC Online has the logic that, if the user has provided Quantity, Rate & Amount, QODBC will send Quantity & Amount to QuickBooks.

So you need to send Quantity & Rate and remove Amount. The Amount will be auto calculated.

For Example:

Insert into "InvoiceLine" ("CustomerRefListID", "CustomerRefFullName", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineQuantity", "InvoiceLineRate", "FQSaveToCache") VALUES ('11', 'Alder Electric', '19', 'Todd Gardner', 37.5, 42.50, 1)

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'})

Troubleshooting - [QODBC] Invalid operand for operator: <assignme...

$
0
0

Troubleshooting - [QODBC] Invalid operand for operator: <assignment>

Problem Description:

I am getting the error "Invalid operand for operator: <assignment>" while trying to insert an invoice line item:

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)

 

Solution:

You will get Invalid operand for operator error when you provide wrong data type values in your query.

For Example:

Column data type is decimal/integer/bit & you are inserting value as string/character.

In your query InvoiceLineAmount column data type is decimal & you provided value as string/character.

Please refer below sample query & test again:

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)

Please refer QODBC Data Layout for more details.

Troubleshooting - This record has been changed by another user si...

$
0
0

Troubleshooting - This record has been changed by another user since you started editing it.

Problem Description:

I am using the Quickbooks Pro 2015 trial version and a purchased QODBC latest version.

I have an Access database with linked QB tables. I also have Access tables some of which parallel the QB tables (for testing).

One of these tables is the Customer table if I use the Access local version of the Customer table I can edit records and move to the next record and data is saved.

If I use the QODBC linked Customer table the edited value appears in the field but when I leave and return to the record the pre-edit value appears. If I re-edit the record and move to the next record I always get an error message that the record is open by another user and the pre-edit value appears.

In both cases, the same form is being used only the queried table fields change therefore I know this is either a QB or QODBC generated the problem.

If I open the linked Customer table in datasheet view and edit a record and move to the next record the same happens – the edit is not saved and the record value does not change when I move to the next record.

I am definitely the only user as I am developing an interface with QB using QODBC and QB and my Access program only reside on my PC.

How do I get QB or QODBC to save my edits to the record and stop returning the error message that ‘the record is in use by another user and cannot be saved’?

Solution:

Please make sure that the record is not being in use from the QuickBooks UI in edit mode or any other user is modifying the same. You can open QuickBooks in single user mode & try to modify the record. Before modifying record just make sure that the record is not open from QuickBooks UI.

In case updated records are not showing up, MS Access table would require a refresh. So please close MS Access linked table & reopen again you will get updated records.

If above steps do not resolve the issue, try to create new MS Access database file & link table and try to edit record and share the outcome. 

Viewing all 313 articles
Browse latest View live