Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : Multi Invoiceline Query Crashes QuickbooksSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 Multi Invoiceline Query Crashes Quickbooks 
 Author   Message 
  Alex Casanova 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-10-10 
 Profile
 Posted : 2008-11-06 06:34:41

The Query Below works in VB DEMO. I am Developing this query in php remotely from a development machine with quickbooks installed.  When i run this query, Quickbooks crashes and ultimately causes apache to crash.  Upon re-opening quickbooks my invoice is there in its entirety.  I'm curious if this has to do with some columns in the wrong order. Or missing fields.  If some one could clarify my queries for me, that would be greatly appreciated. 

Apache 2.2.8
PHP 5.2.6

INSERT INTO InvoiceLine ("CustomerRefListID", "CustomerRefFullName", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineQuantity", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") Values ('80000A68-1225912509','12103 - AlexCo TEST','800000DD-1198767528' , 'Blog Hosting' ,1.00,25.00,25.00, '20000-1121968163' ,1)

INSERT INTO InvoiceLine ("CustomerRefListID", "CustomerRefFullName", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineQuantity", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") Values ('80000A68-1225912509','12103 - AlexCo TEST','8000002B-1197388752' , 'MedNet-Site-16pg Maintenance & Hosting' ,25.00,115.00,2875.00, '20000-1121968163' ,1)

INSERT INTO InvoiceLine ("CustomerRefListID", "CustomerRefFullName", "InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineQuantity", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") Values ('80000A68-1225912509','12103 - AlexCo TEST','80000050-1197388753' , 'SEO-Tier 1-Mid-Size City/Region' ,1.00,90.00,90.00, '20000-1121968163' ,1)

INSERT INTO Invoice ("CustomerRefListID", "ARAccountRefListID", "TxnDate","RefNumber", "BillAddressAddr1", "BillAddressCity","BillAddressState", "BillAddressPostalCode", "BillAddressCountry","IsPending", "TermsRefListID", "DueDate", "ShipDate", "ItemSalesTaxRefListID","Memo", "IsToBePrinted", "CustomerSalesTaxCodeRefListID") VALUES ('80000A68-1225912509','80000016-1197388734',{d'2008-11-05'}, '152779', ' 213 Bulletin Road Suite 738','Elmont','NY','12456', 'USA', 0, '8000000A-1198769470',{d'2008-12-31'},{d'2008-11-05'}, '10001-1134667650', 'Memo Test', 1,'20000-1121968163') 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-06 08:22:43
The SQL Statements at a glance look fine and indeed execute in VB Demo without problems. So it stands to reason that the SQL Statements do not crash the system. You have provided no details on what version of QODBC is being used, what country, version and year of QuickBooks is being used and whether you or not you are using the QODBC Server Edition as required by all applications that are or are being called through a Windows Service. 

  Top 
  Alex Casanova 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-10-10 
 Profile
 Posted : 2008-11-06 08:35:48
Yes the version on the machine with quickbooks installed is running the US server edition, version 8.00.00.242

Quickbooks Enterprise Solutions 8.0 is the version of quickbooks.  I am using a trial version of qodbc driver on my machine which isn't licensed.  However the machine with Quickbooks installed is equipped with a licensed copy. Would I too, need a fully licensed copy of the qodbc driver? 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-06 09:35:42

See: How does the 30 day evaluation work? How can I evaluate the Desktop Edition? 

Try running the PHP script on the machine with QuickBooks installed as you have not said how you are working remotely.

 

  Top 
  Alex Casanova 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-10-10 
 Profile
 Posted : 2008-11-06 09:45:01
Sorry I was actually just corrected.  Im not Remoting at all really... Im running my script off another machine which is licensed.  I just happen to be coding the files from my machine but it is run on the machine with quickbooks and the qodbc driver installed. 

  Top 
  Alex Casanova 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-10-10 
 Profile
 Posted : 2008-11-07 05:17:01
I have tried Just inserting a single invoice line below
INSERT INTO InvoiceLine ("CustomerRefListID","ClassRefListID", "InvoiceLineItemRefListID", "InvoiceLineDesc","InvoiceLineQuantity", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") Values ('80000A65-1225909648','80000001-1225983344','800000DD-1198767528','Blog Hosting',1.00,25.00,69.00,'20000-1121968163',0)

I still get the data written into quickbooks however Quickbooks still hangs.  I am curious if Quickbooks is hanging becuase it is optimizing after the query is executed?  I dont know how wise stopping the optimizer would be. But i tried and no luck.  The other developer here has mentioned that if the columns are out of order then quickbooks may freeze.  I have read all the details on the Invoice Line table.  CustomerRefListID and CustomerRefFullName is required even though I have seen other wise.  I'm just confused between what I should do with these queries to smoothly go to quickbooks or if it is my queries at all. 
Not to mention I don't have any problem with inserting a new customer into the customer table.  Please Shed Light
Thank you
 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-11-07 08:01:02
Ok, reboot to clear the crashed connections from memory and then try the insert using VB Demo only. For PHP and Apache to work you need to set up the QODBC DCOMs as per: How do I manually setup the QODBC DCOM Servers on Windows XP Pro and Windows 2003 Server?  

  Top 
  Alex Casanova 
  
 Group: Members 
 Posts: 7 
 Joined: 2008-10-10 
 Profile
 Posted : 2008-11-08 02:22:47
I figured since the queries would complete successfully in VB demo then the queries may not be the issue.  I took off the check for "Optimize data after an insert or Update" and then I clicked the radio button for "The start of every new conn...(with "Load Updated data first) and everything worked without crashing.  So today I will do some more testing to make sure there are no hiccups. Thank you Tom , I'll keep you updated 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to