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:
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).
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:
We have created an ASP.NET (framework 2.0) webservice that resides on our QuickBooks v8 Enterprise server. The web service allows us to create a new SalesOrder within our Quickbooks file. The application works, however on bigger orders (39 line items) it takes 30 minutes to get the whole SalesOrder in which will be impossible to work with when we get bigger and lots of orders.
We then have an ASP.NET application on another server that interacts with this web service.
I have gone through a number of forum posts and I have added the following without any improvements:
Keeping the connection open and shared across all SalesOrderLine INSERTS
Adding AspCompat="true" to the ASP.NET aspx page that calls the web service
[STAThreadAttribute] added to each web method in the Web Service
It currently takes between 15 and 30 seconds for each insert which soon adds up for bigger orders
Other information:
- Connection String in use: DSN=Quickbooks Data;OLE DB Services=-2; - Optimizer: Turned off on the ODBC DSN - Using DCOM server - Quickbooks machine running Windows Server 2003
Please let me know what else we need to try to speed this thing up.
Turn the optimizer back on!!! And then check your optimization settings to use the The start of every new connection (with "Load Updated Data" first) option and confirm that the Multi-Table Sync option has been disabled. If not, uncheck the Multi-Table Sync option as this is often defaulted on (checked) with QuickBooks Enterprise. And make sure you don't have "Optimize data after an Insert or Update" checked (like shown below).
I have configured the ODBC setup with the optimizer settings as you provided.
When I try the application again with this turned on it hangs, and nothing gets logged in any of the logs to help me understand the problem.
I then tried clicking the "Load Updated Data" button so it could do a refresh of QB data to the opt file, however this gives me the following error:
Load Updated Data did not complete (5)
And the QODBCLOG.txt shows the following:
2008-07-31 10:11:12 QODBC Ver: 8.00.00.242 ********************************************************************************************************************* IsAService: False Error Code: 26 SQLOptimize_OpenOptimizeDBHandle prepare: SELECT "type", "tbl_name" FROM "SQLite_MASTER" file is encrypted or is not a database
The anonymous (or authenticated) web user IUSR_machinename, ASPNET user and INTERACTIVE must all have full rights to the optimizer folder.
ASP.NET runs queries as multiple treads, and the QODBC optimizer is single user only. So you need to setup a different optimizer file for the ASP.NET application to use than the other disktop applications. To do this, set up a seperate System DSN (see: How do I create or configure a QODBC DSN? ) and specify a fixed location of the optimizer database folder for the ASP.NET application to use (like: C:\Program Files\QODBC Driver for QuickBooks) instead of the default %UserProfile% method. Finally the user or system account used (Anonymous web user IUSR_machinename, ASPNET user and INTERACTIVE) by the ASP.NET application must all have full rights to the optimizer folder.
You don't need to optimize all the QODBC tables if you're just using a handful of tables. Simply rebuild (sp_optimizefullsync) or update (sp_optimizeupdatesync) the tables you use from within your ASP.NET application using:
I have successfully removed the OPT file from the optimizer directory. I can now load updated data without error.
We have now optimised Customer & SalesOrderLin.e We have changed our application to run sp_optimizeupdatesync SalesOrderLine AND sp_optimizeupdatesync Customer when it begins to control what is optimised.
When ever we run the sp_optimizeupdatesync commands in our ASP.NET webservice it just hangs still. We get the following SDK messages:
20080804.122156 I 5600 RequestProcessor ========= Started Connection ========= 20080804.122156 I 5600 RequestProcessor Request Processor, QBXMLRP2 v7.0 20080804.122156 I 5600 RequestProcessor Connection opened by app named 'FLEXquarters QODBC' 20080804.122156 I 5600 CertVerifier The Authenticode signature validated OK. 20080804.122159 I 5600 RequestProcessor Opening the file in the Multi-User mode. 20080804.122205 I 4360 QBSDKProcessRequest Application named 'FLEXquarters QODBC' starting requests (process 5600). 20080804.122205 I 4360 SpecVersion Current version of qbXML in use: 7.0 20080804.122205 I 4360 QBSDKMsgSetHandler QUERY: Host 20080804.122205 I 4360 QBSDKMsgSetHandler Request 1 completed successfully. 20080804.122205 I 4360 QBSDKMsgSetHandler QUERY: Company 20080804.122205 I 4360 QBSDKMsgSetHandler Request 2 completed successfully. 20080804.122205 I 4360 QBSDKMsgSetHandler QUERY: DataExtension Definition 20080804.122205 I 4360 QBSDKMsgSetHandler Request 3 completed successfully. 20080804.122205 I 4360 MsgSetHandler Finished. 20080804.122205 I 4360 QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 5600), ret = 0.
And we get the following Event Viewer entry multiple times:
The description for Event ID ( 4 ) in Source ( QuickBooks ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: QuickBooks, Returning NULL QBWinInstance Handle.
returns null (no rows), so that's most likely the problem. Once the tables have been optimized you don't need to run sp_optimizeupdatesync SalesOrderLine as this is done automatically by QODBC. If you need to rebuild a optimized table simply use the VERIFY tag like this:
SELECT "Name","LastName","FirstName","BillAddressAddr1", "BillAddressAddr2","BillAddressCity", "BillAddressState","BillAddressPostalcode" from Customer VERIFY
We are trying to set up and ASP.NET program that reads customer data from Quickbooks using QODBC. The platform is WIndows Server 2003. We have the Use DCOM servers checked and setup all the authorizations. We are using ADODB, but on opening the connection it hangs and eventually gives a timeout error. I have read through all I could find, but cannot get passed this problem. Please help.
We have already gone through that post and did all that. There is one further development. We installed Visual Web Developer on the server and in a debugging session we could actually get the data. But as soon as we copy the program to c:\Inetpub\wwwroot\ it takes much longer and eventually gives the timeout. Any further ideas?
It simply gives a "HTTP Error 404 - File or directory not found. Internet Information Services (IIS)" I think it is because this is an .ASP file and not .ASPX. We have two asp.net projects running on this server and they work fine. I tried to put this file on .net platform 2.0 and also in 1.1, but both gave this error.
we have tried to replace the webservice application for a console application on c#.
We have applied the [STAThread] attribute as per the post http://www.qdeveloper.com.au/forum.php?homeinclude=topicdetails&forum_id=1&category_id=40&post_id=1809
We have also added the VERIFY parameter on our queries and also the FQSaveToCache in our inserts but none of them seem to be making any difference.
I'm posting our code here to see if anybody has had the same problem and can give us a hand