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 : VBScript Connection to Quickbooks is hangingSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v9 Forum

 New Topic 
 
 Post Reply 
[1]  
 VBScript Connection to Quickbooks is hanging 
 Author   Message 
  justin 
  
 Group: Members 
 Posts: 10 
 Joined: 2008-10-17 
 Profile
 Posted : 2008-10-17 10:27:57

Hi, I'm pretty new to this so I'll try to explain as best as I can

I'm using

Window 2003 Server
QODBC 9.0 Trial
Quickbooks Enterprise Solution 9.0 Trial Version (ran available updates)

I've set up everything according to these pages

http://www.qodbc.com/qodbcinstall.htm
http://www.qodbc.com/qodbcconnect.htm
http://www.qdeveloper.com.au/forum.php?homeinclude=topicdetails&forum_id=1&category_id=2&post_id=33 (interested in the auto-login "unattended" mode)

When installing Quickbooks and QODBC, it was installed under the domain admin. All the setup was done under the domain admin intially.

When using the QODBC setup, it only created a user DSN, so I have removed that and created a System DSN with the same setup.

So I tried to set up some basic tests. VBDemo worked fine. I've tried using the qbcust.asp (installed under C:\inetpub\wwwroot) and I get the hanging issue when the application attempts to open the connection to Quickbooks, similar to the people who wrote these posts:
http://www.qdeveloper.com.au/forum.php?homeinclude=topicdetails&forum_id=1&category_id=42&post_id=2380
http://www.qdeveloper.com.au/forum.php?homeinclude=topicdetails&forum_id=1&category_id=42&post_id=2262

When I saw that I removed the System DSN entry that I've made and re-logged in as the ADMINISTRATOR (not the domain admin), started Quickbooks under this account and re-added the System DSN, tested and configured in Quickbooks to allow auto-login.

From the Administrator login, I tried to run qbcust.asp, but it still hangs when it tries to open the connection. (connection string is "DSN=Replicon QB Test;OLE DB Services=-2"). If I had the incorrect DSN name, it qcust.asp would return an error "Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified "

A couple of things I've noticed:
- I do not see the same screen as you see here (http://www.qodbc.com/images/first01.jpg). The only difference is that I do not see the dropdown for Login as:[Admin] and the "Allow this application to access Social Security Numbers and other personal data" is greyed out.
- The file I am working with is a small backup copy made by a previous version of Quickbooks (I will have to get back to you on the version that created it). I have not tried this with a sample company file, which is what I'll do next.

In the meantime, any suggestions?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-17 11:28:44
Yes, please review: How can I see QuickBooks data in a Internet Explorer Browser using Windows XP? and Permissions Issue with IIS using AUTHENTICATED USERS  

  Top 
  justin 
  
 Group: Members 
 Posts: 10 
 Joined: 2008-10-17 
 Profile
 Posted : 2008-10-23 03:15:43

Okay this is what I've done so far:

- check IIS version (6), copied the qbcust.asp and TestDCOM.asp under C:\InetPub\wwwroot
- there is no option to de-select "Allow IIS to control password", so left it as is
- sample company file set to multi user mode
- have the system DSN created for "Quickbooks data" (and set the DSN entry to have the Server Edition's "Use DCOM Servers" checkbox checked), ODBC data source is set to the full path, the advance settings are as exactly in this image (http://www.qdeveloper.com.au/images/advancedtab.JPG), ensured that FLEXQuarters QODBC in the Quickbook preferences (Integrated Applications) has access, and is allowed to login automatically and has access to personal data.
- verify that MDAC (2.82) is installed
- Full Control given to IUSR_<COMPUTERNAME>, ASPNET, INTERACTIVE to the folder C:\Program Files\QODBC Driver for Quickbooks\
- Ran dcomcnfg and set the launch permissions for IUSR_<COMPUTERNAME>, ASPNET, INTERACTIVE to have all launch permissions for qbXMLRP2eQODBCInteractive
- downloaded the qodbcSetDCOM.zip and ran Dcpint.exe and QODBCSetDCOM.vbs once for each
- killed any instances of qbXMLRPeQODBCInteractive.exe and qbXMLRP2eQODBCInteractive.exe running in the task manager
- ran TestDCOM.asp (I've gotten every status to be Success, except for XERCES-COM.dll, the error says "Error: ActiveX component can't create object"). I did find that xerces-com.dll exists under C:\WINDOWS\System32\
- ran qbcust.asp (the last response.flush on the screen says "ADO Recordset Created - Opening Quickbooks Sample Company File" and it hangs upon the open connection command again)

Anything else I should do? Or do I need to fix the xerces-com.dll issue first?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-23 07:53:28
See: Permissions Issue with IIS using AUTHENTICATED USERS and XERCES-COM.dll Error: ActiveX component cant create object  

  Top 
  justin 
  
 Group: Members 
 Posts: 10 
 Joined: 2008-10-17 
 Profile
 Posted : 2008-10-23 07:59:50

Okay, this is an update to what I've just done in my previous post.

I'm guessing that one of those steps must have fixed it, because after logging off the machine and logging back on, I've been able to get past the open connection command in the ASP. Before logging off I thought that killing the qXMLRP2eQODBCInteractive.exe in the task manager would fix it, but it appears that logging off or restarting is a better way to ensure that any QODBC processes are restarted properly.

qbcust.asp returned the same results as what the VBDemo application does when running the same query.  However viewing the data through the webpage takes quite a long time (about 30 seconds to a minute) to return the results of the query (and there are only 6 results returned). Is this normal for speed?

Also, I am still getting the xerces-com.dll error from TestDCOM.asp. Do I still need to concern myself over the inability to instantiate this object? What does it do?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-23 08:09:38

Try refreshing qbcust.asp, it should run faster the second time round. Xerces-com.dll is the XML parser used by QODBC and is working already. It's just the revision that needs to be correctly set in TestDCOM.asp:

Set oXERCES = CreateObject("Xerces.DOMDocument.2.8.0")

Note to Everyone: When setting up the QODBC DCOMs you always need to reboot your computer/server.

 

  Top 
  justin 
  
 Group: Members 
 Posts: 10 
 Joined: 2008-10-17 
 Profile
 Posted : 2008-10-23 09:19:06

Okay, changing it to 2.8 fixed the Xerces problem (I originally changed it to 2.5 (I checked the version of the dll, so I thought it had to match)).

As for the speed issue, the only thing that is faster when refreshing is opening the connection. As for querying the data, it still seems to take a long time.

I've added timers to qbcust.asp to see how long it takes:

- initial run of QODBC takes about 7 seconds to open the FIRST connection
- subsequent opening connection are almost immediate, less than one second to open.
- running the query ("SELECT * FROM CUSTOMER"), either the first time or any subsequent times, takes 47-48 seconds to return 6 results from the query.

We're running
- Windows 2003 server on an intel core duo @ 3Ghz
- 3GB RAM

I've monitored the task manager performance while the qbcust.asp application is running, and the initial instantiation of QBW32.EXE takes about 4 seconds of CPU time, with very low impact on CPU Usage. While it is retrieving results, the CPU is running pretty much at 0 percent for the 47-48 seconds.

The database file is stored locally on the system, so I'm not sure where the speed issue is originating from? Unless, like I said, this is normal speed?

And Tom, I want to thank you for all the help you've given me so far, I really appreciate it.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-23 09:54:07

Try changing the query to:

SELECT * FROM CUSTOMER NOSYNC

and let me how slow that is.

 

  Top 
  justin 
  
 Group: Members 
 Posts: 10 
 Joined: 2008-10-17 
 Profile
 Posted : 2008-10-24 05:01:05

okay here are the speed results using "Select * From Customer NOSYNC" (6 results returned)

- Initial Open Connection (7 seconds)
- Subsequent Open Connections (0 seconds)

- Initial Query Run (32 seconds, about 25% speed improvement)
- Subsequent Query Runs (16 seconds, about 75% speed improvement)

This is a good improvement, but I still can't help but feel that this is still slow in comparison to other databases I've worked with. Is this the speed that most people get using the QODBC drivers? I'm worried about how much longer it will take when the result set gets much larger when using real data.

Are there things in the Optimizer tab that I should check to increase the speed?
Right nowI only have "Keep my optimized data up to date as of: The start of every query" checked.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-24 08:03:13

I think you don't understand that most of the overhead is caused by QODBC having to first check with QuickBooks that you have permission to access the Customer table in the first place. QODBC uses the Intuit qbXML SDK to talk to QuickBooks. QODBC simply takes a SQL Statement and converts it to a XML Request that's sent to QuickBooks and QuickBooks sends back a XML document that we strip off all the tags and return the data. In the case of the optimizer, we by-pass the last part only and retrieve the data from the optimized SQLite Server table on the workstation instead.

See: How do I setup the QODBC Optimizer? Where are the Optimizer options? for more on how the optimizer works.

 

  Top 
  justin 
  
 Group: Members 
 Posts: 10 
 Joined: 2008-10-17 
 Profile
 Posted : 2008-10-29 09:59:31

Thanks again Tom.

I'll just give an update, plus a new problem.

Actually, I'm not sure exactly what happened, but after some restarts, the qbcust.asp application completes in less than a second now. The only thing that takes a bit longer sometimes is opening the connection (which takes approximately 4-10 seconds), but subsequent refreshes complete the page almost instantly. We tried stress testing qbcust.asp and it worked just fine.

So I began writing my own application in C# .NET, and unfortunately I'm running into the open connection issue hanging again.

Here is a snippet of the code:

   OdbcConnection con = new OdbcConnection("DSN=Replicon QB Test;OLE Services=-2");
   con.Open();
   OdbcDataAdapter dAdapater = new OdbcDataAdapter("SELECT * FROM CUSTOMER", con);
   DataTable result = new DataTable();
   dAdapater.Fill(result);

When I hit the con.Open() command, my page hangs indefinitely again. The web app is running on the same machine as qbcust.asp, in the same directory too.

It appears that I'm running into the exact same issue as the person who wrote this thread Asp.Net QODBC connection problems, where he can get TestDCOM.asp and qbcust.asp to work, but his C# .NET web application does not. I see the same things he does as well, when the C# .NET application runs, the task manager shows that QBW32.EXE and qbXMLRP2eQODBCInteractive.exe are started.

I've also took a look at the QODBC SDK logs and looked at the difference between running the C# .NET web application versus qbcust.asp

C# .NET web application SDK log:

20081028.162226 I 5968 RequestProcessor ========= Started Connection =========
20081028.162226 I 5968 RequestProcessor Request Processor, QBXMLRP2 v7.0
20081028.162226 I 5968 RequestProcessor Connection opened by app named 'FLEXquarters QODBC'
20081028.162226 I 5968 CertVerifier The Authenticode signature validated OK.
20081028.162227 I 5968 RequestProcessor Opening the file in the DoNotCare mode.
20081028.162231 I 2056 QBSDKProcessRequest Application named 'FLEXquarters QODBC' starting requests (process 5968).
20081028.162231 I 2056 SpecVersion Current version of qbXML in use: 8.0
20081028.162231 I 2056 QBSDKMsgSetHandler QUERY: Host
20081028.162231 I 2056 QBSDKMsgSetHandler Request 1 completed successfully.
20081028.162231 I 2056 QBSDKMsgSetHandler QUERY: Company
20081028.162231 I 2056 QBSDKMsgSetHandler Request 2 completed successfully.
20081028.162231 I 2056 QBSDKMsgSetHandler QUERY: DataExtension Definition
20081028.162231 I 2056 QBSDKMsgSetHandler Request 3 completed successfully.
20081028.162231 I 2056 MsgSetHandler Finished.
20081028.162231 I 2056 QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 5968), ret = 0.

 qbcust.asp SDK log:

20081028.162511 I 5968 RequestProcessor ========= Started Connection =========
20081028.162511 I 5968 RequestProcessor Request Processor, QBXMLRP2 v7.0
20081028.162511 I 5968 RequestProcessor Connection opened by app named 'FLEXquarters QODBC'
20081028.162511 I 5968 CertVerifier The Authenticode signature validated OK.
20081028.162511 I 5968 RequestProcessor Opening the file in the DoNotCare mode.
20081028.162511 I 2056 QBSDKProcessRequest Application named 'FLEXquarters QODBC' starting requests (process 5968).
20081028.162511 I 2056 SpecVersion Current version of qbXML in use: 8.0
20081028.162511 I 2056 QBSDKMsgSetHandler QUERY: Host
20081028.162511 I 2056 QBSDKMsgSetHandler Request 1 completed successfully.
20081028.162511 I 2056 QBSDKMsgSetHandler QUERY: Company
20081028.162511 I 2056 QBSDKMsgSetHandler Request 2 completed successfully.
20081028.162511 I 2056 QBSDKMsgSetHandler QUERY: DataExtension Definition
20081028.162511 I 2056 QBSDKMsgSetHandler Request 3 completed successfully.
20081028.162511 I 2056 MsgSetHandler Finished.
20081028.162511 I 2056 QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 5968), ret = 0.
20081028.162511 I 2056 QBSDKProcessRequest Application named 'FLEXquarters QODBC' starting requests (process 5968).
20081028.162511 I 2056 SpecVersion Current version of qbXML in use: 8.0
20081028.162511 I 2056 QBSDKMsgSetHandler QUERY: Customer Job
20081028.162511 I 2056 CustomerStorage::DoQuery Setting iterator chunk size to 00000500
20081028.162511 I 2056 QBSDKMsgSetHandler Request 1 completed successfully.
20081028.162511 I 2056 MsgSetHandler Finished.
20081028.162511 I 2056 QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 5968), ret = 0.

Not sure if these SDK logs help, but I was hoping that maybe through here you could see where the application stopped working for my web app.

Thanks Tom,

Justin

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-10-29 11:47:21

The C# .NET web application SDK log shows things are running, so I would guess it's your code:-

Try this (change DFQ to your company file path):-

Dim cnQODBC As System.Data.Odbc.OdbcConnection
Dim daQODBC As System.Data.Odbc.OdbcDataAdapter
Dim dsQODBC As System.Data.DataSet

cnQODBC = New System.Data.Odbc.OdbcConnection("DSN=Replicon QB Test;DFQ=C:\Program Files\QODBC Driver for QuickBooks\sample04.qbw;OLE Services=-2");
cnQODBC.Open()
daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT ListID, FullName, CompanyName FROM Customer", cnQODBC)
dsQODBC = New System.Data.DataSet

daQODBC.Fill(dsQODBC)
dgDataGrid.DataSource = dsQODBC
dgDataGrid.DataBind() 'May or maynot be required depending on where you put this code

 

  Top 
  justin 
  
 Group: Members 
 Posts: 10 
 Joined: 2008-10-17 
 Profile
 Posted : 2008-10-30 04:50:32

Unfortunately, adding the DFQ parameter and the exact pathname to the database did not change anything.
It still hangs while qbcust.asp runs perfectly.

I also checked the SDK logs to see if there were any differences, but it looks to be exactly the same as what I wrote earlier.

The C# .NET application SDK log "looks" like it "completes" one request to the FLEXQuarters QODBC (which I assume is the open command), but for some reason it doesn't return properly to my application that it has finished?

I see that in comparison, qbcust.asp begins a second request to FLEXQuarters QODBC, which I assume is when I run the query.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to