QODBC causes Qbooks Enterprise to not respond |
Author |
Message |
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-11 08:31:02 |
While attempting to export QuickBooks Enterprise 7 tables, as soon as I specify a table (using the ADO import within Alpha Five in this case), QuickBooks immediately becomes unresponsive. The message I derived from this failure is "ADO error. Could not determine fields in 'Bill' . Following error was reported by ADO (QODBC). Expected lexical element not found: <keywords>".
Any idea what's going on here? Is there an issue with the QuickBooks database? QODBC?
Jeff |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-11 13:34:13 |
Please review the QODBC message log for the SQL statement with the syntax error in it and advise.
|
|
|
|
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-11 17:25:34 |
I ran the import for the company table only selected. It ran properly. Then I ran an import for another file only, in this case the Bill table. It immediately went into the hour glass funk, where task manager revealed that QuickBooks is not responding. The only way out at this point is to end the QuickBooks task.
I've been through this with other tables with lots of data, and none avoid the same experience where QuickBooks goes unresponsive.
Therefore, it worked for a one-record company table but not for a multi-record table.
Following is the QODBC Message resulting when I attempted one of the multi-record tables, in this case the Bill table:
2007-02-11 01:09:19 QODBC Ver: 7.00.00.207 ********************************************************************************************************************* IsAService: False SQL Statement: select * from Bill where 1 = 2 Error Getting XML in BuildAndLoadXMLForNextRecord Input XML: <?xml version="1.0" encoding="ISO-8859-1"?> <?qbxml version="6.0"?> <QBXML> <QBXMLMsgsRq onError="continueOnError"> <BillQueryRq requestID="1" iterator="Start"> <MaxReturned>00000500</MaxReturned> <IncludeLineItems>0</IncludeLineItems> <IncludeLinkedTxns>0</IncludeLinkedTxns> <IncludeRetElement>TxnID</IncludeRetElement> <IncludeRetElement>TimeCreated</IncludeRetElement> <IncludeRetElement>TimeModified</IncludeRetElement> <IncludeRetElement>EditSequence</IncludeRetElement> <IncludeRetElement>TxnNumber</IncludeRetElement> <IncludeRetElement>VendorRef</IncludeRetElement> <IncludeRetElement>APAccountRef</IncludeRetElement> <IncludeRetElement>TxnDate</IncludeRetElement> <IncludeRetElement>DueDate</IncludeRetElement> <IncludeRetElement>AmountDue</IncludeRetElement> <IncludeRetElement>RefNumber</IncludeRetElement> <IncludeRetElement>TermsRef</IncludeRetElement> <IncludeRetElement>Memo</IncludeRetElement> <IncludeRetElement>LinkToTxnID</IncludeRetElement> <IncludeRetElement>IsPaid</IncludeRetElement> </BillQueryRq> </QBXMLMsgsRq> </QBXML>
2007-02-11 01:09:33 QODBC Ver: 7.00.00.207 ********************************************************************************************************************* IsAService: False Begin Session Failed. S0000 00000 [QODBC] QB Begin Session Failed. Error = 80040408, Could not start QuickBooks. Begin Session errors can be caused when running ASP or other system service and not setting the "Advanced" button option of either "Use DCOM Servers" or "Remote Connector" |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-11 21:31:29 |
Sorry, this is plain nonsense:
select * from Bill where 1 = 2
There's no column called 1 and 1 would never equal 2. What is generated this SQL Statement? The statement should just be:
select * from Bill |
|
|
|
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-12 00:39:20 |
Tom,
The formation of this select statement comes from using Alpha Five to import from QuickBooks. Do you think Alpha Five is improperly creating queries? And why would an incorrect query statement cause QuickBooks to hang?
How can I go direct to try exporting data from QuickBooks? Do I do it within QODBC with the statement "select * from Bill"? If so, how do I tell it I want the data in DBF format, as I comes in via Alpha Five? Thanks.
Jeff |
|
|
|
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-12 02:30:34 |
The problems I am having are on a system with QuickBooks Enterprise. My own system is QuickBooks Pro. I have no problem making QODBC work with my QuickBooks Pro.
With QuickBooks Pro, I can run an import (i.e., extract data from QuickBooks tables) without the need for QuickBooks to be open as long as I previously defined the connection.
With QuickBooks Enterprise, I cannot run this procedure unless QuickBooks is open.
Is this really the case, that with Pro it doesn't have to be open and with Enterprise it does need to be open? If so, why such an inconsistency within the QuickBooks product line?
Thanks.
Jeff |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-12 08:19:19 |
|
|
|
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-12 10:41:53 |
First, I already had the settings you refer to, to enable unattended access, but it always requires QuickBooks to be open.
Second, I can't understand what's going on where QuickBooks hangs when I'm requesting any table with multiple records. Yes, I was using Alpha Five's ADO import facility, and doing it properly, but I now need to get off that and move on. Can you tell me if Visual Foxpro (V8) can be used with your QODBC driver? Thanks.
Jeff |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-12 15:10:20 |
|
|
|
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-12 16:44:20 |
I did as you suggested and ran the VB Demo against the Enterprise file. It worked for pulling up the Company table, which is only one record, but when I added bill to the select * from bill, it made QuickBooks non-responsive when I had QuickBooks open, and it did nothing when QuickBooks was closed. I guess I can assume that this is a corrupted company file, right? This even though the file is being used in operations daily?
If the QB Enterprise file is corrupted, how do I fix that corruption? This is a 1.8GB file. Please advise.
Jeff |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-12 23:45:41 |
I'm going to guess that you have lots of bills in your big company file. Let's try getting it down to a smaller record set:
select * from Bill UNOPTIMIZED WHERE Txndate > {d '2007-01-31'} and Txndate < {d '2007-02-12'}
The hour glass means it's working on lots of data, this query limits the billing data to this month only. Let me know how it goes. |
|
|
|
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-13 03:01:58 |
select * from Bill UNOPTIMIZED WHERE Txndate > {d '2007-01-31'} and Txndate < {d '2007-02-12'} did work. There was a slight delay, then it presented data.
Does this mean that if I do a select * from Bill, it would eventually complete? I have tried this, and after several hours it still showed QuickBooks as not responding. Or, do I always need to select a small subset of data?
Thank you. I'm beginning to see light at the end of the tunnel. Now I need to check whether I can use Alpha Five to import the data, or whether it will still come up with that select * from bill where 1=2.
Jeff |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-13 08:28:38 |
Because your company file is large, you need to increase your "Use Iterator or Chunk Size" setting from 500 to 20,000.
Iterator or Chunk Size determines the size of the rowsets that are retrieved from QuickBooks per fetch. Set this value high if you are exporting records from QuickBooks. The maximum Iterator or Chunk size that can be set is 100,000 (higher than that and it resets itself back to the default of 500).
The real way to do this is to first optimize your tables by using the [ Load Updated Data ] or [ Reload All Data ] (if you have just started using QODBC) option in the QODBC setup screen.
Once optimization is completed (the time this takes is dependent on the size of your company file), use queries with the NOSYNC command to import the tables into Alpha Five like this for each of the tables you wish to import:
select * from Bill NOSYNC select * from BillItemLine NOSYNC select * from BillExpenseLine NOSYNC
If you're only interested in some of the tables, you can instead only optimize selected tables by running:-
sp_optimizefullsync Bill
and then update it manually at any point of time by doing:-
sp_optimizeupdatesync Bill
Because QODBC can optimizer your data and automatically update it for you, most of the time it's better to call the optimized tables instead of importing the data in the first place. See: How do I setup the QODBC Optimizer? Where are the Optimizer options? for more. |
|
|
|
Jeff |
|
Group | : Members |
Posts | : 11 |
Joined | : 2007-02-09 |
|
Profile |
|
Posted : 2007-02-13 08:51:34 |
I'm going to try all this, especially the Chunk Size change. Unfortunately, I can't run the optimize procedure until the weekend since it will probably take a couple days to complete (I tried it this past weekend but it was aborted after one day by someone inadvertently, and it was about half way) and I don't want to run it into their daily operations. I assume I can do the rest you suggested even if I have not optimized.
I'll let you know how it turns out.
Thanks.
Jeff |
|
|
|