Knowledgebase
[QODBC-Desktop] How to Insert Multiple Records into TimeTracking Table
Posted by Rajendra Dewani (QODBC Support) on 14 April 2014 03:32 PM

Instruction:

When you want to insert multiple records into a line item table, you can use column FQSaveToCache.

Set column FQSaveToCache to 1 in all insert queries except the last line set to 0. But table TimeTracking is not a line item table, there is no FQSaveToCache column in that table.

So you need to use the alternate method. This article will show you how to use the sp_batch command to insert multiple records into TimeTracking.

If you are not familiar with the sp_batch statement, please refer to This article for more information.

First please run:

SP_BATCHCLEAR Timetracking

This command will remove all cached data from TimeTracking table. It will make sure only queries below will be executed.

 

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

 

Then run this query to start the batch:

SP_BATCHSTART Timetracking

When this query is executed, all queries later will be stored into the cache instead of directly sending to QuickBooks

Then run your insert queries. Here we use our test company file as an example:

INSERT INTO TimeTracking (EntityRefListID, DurationMinutes, TxnDate, CustomerRefFullName, ItemServiceRefFullName, PayrollItemWageRefFullName) Values ('800000E4-1481796260',540, {d'2012-01-20'},‘Cook, Brian:Kitchen’,'Removal','Salary')

INSERT INTO TimeTracking (EntityRefListID, DurationMinutes, TxnDate, CustomerRefFullName, ItemServiceRefFullName, PayrollItemWageRefFullName) Values ('800000E4-1481796260',600, {d'2012-01-20'}, ‘Cook, Brian:Kitchen’,'Removal','Salary')

After all insert queries are executed, upload all cached queries to QuickBooks using this command:

SP_BATCHUPDATE Timetracking

This query will upload all queries in the cache to QuickBooks.

(1 vote(s))
Helpful
Not helpful

Comments (2)
Bev Kaufman
17 December 2014 07:35 PM
I don't see that this solves my problem. I'm going to have a load of insert queries to run. If I could do this in MS Sql, which is installed on a different server, I would passed all the commands into one query window and hit run. Using VB Demo, the only tool available to me now, I will have to paste each line one at a time and run it. Is there an easier way to do this?
Jack
18 December 2014 08:26 AM
Hi Bev,

I would like to inform you that VB Demo is just an application to test your queries or connection. It is the default behavior of VB Demo you can execute only one command at a time. You can use other ODBC application like MS Access or can write VBA code. Please refer below mentioned article for sample VBA code:
http://support.flexquarters.com/esupport/index.php?/Knowledgebase/Article/View/2571/0/using-quickbooks-data-with-vba
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).