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 : Two Linked Company Files - 60 second delay closing using MS SQL ServerSearch Forum

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

 New Topic 
 
 Post Reply 
[1]  
 Two Linked Company Files - 60 second delay closing using MS SQL Server 
 Author   Message 
  Rob 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-10-31 
 Profile
 Posted : 2007-10-31 06:36:32

I have setup two SQL linked servers to two QODBC driver entries with different company files, because I have a requirement to connect to two divisions for a certain customer.

After querying the first company file:

SELECT * FROM OPENQUERY(QB, 'SELECT * FROM StandardTerms')

It takes approximately 60 seconds for the company file to close.  I can see the first company opening and closing in the UI in my Windows console session.

If I wait 60 seconds then the first company closes and then I can run a query from the second company with no error:

SELECT * FROM OPENQUERY(QB2, 'SELECT * FROM InvoiceLine')

Is there any way to force the QODBC driver to close the company file sooner so that I don't have a 60 second delay or longer between updates to the second company file?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-10-31 07:43:20
QuickBooks only allows for one Company file to be open at the one time. To link mulitple company files you will need to link and unlink seperate company files by specifing different paths in the DFQ=fullpathname connection parameter with a delay between executing sp_addlinkedserver and sp_dropserver.

For example:

EXEC sp_addlinkedserver @server = N'QODBC', @srvproduct=N'QODBC', @provider=N'MSDASQL', @datasrc=N'QuickBooks Data', @provstr = 'ODBC;DSN=QuickBooks Data;DFQ=C:\Program Files\QODBC Driver for QuickBooks\sample04.qbw;SERVER=QODBC;UseDCOM=Y; OptimizerDBFolder=C:\Program Files\QODBC Driver for QuickBooks\Optimizer; OptimizerAllowDirtyReads=Y'


EXEC sp_dropserver @server = N'QODBC'

These stored procedures also allow you to specify the location of the OptimizerDBFolder.

 

  Top 
  Rob 
  
 Group: Members 
 Posts: 2 
 Joined: 2007-10-31 
 Profile
 Posted : 2007-10-31 07:54:48

I tried this method but the same situation remains.

EXEC sp_addlinkedserver @server = N'QB3', @srvproduct=N'QODBC', @provider=N'MSDASQL', @datasrc=N'QuickBooks Data2', @provstr = 'ODBC;DSN=QuickBooks Data2;DFQ=C:\Documents and Settings\All Users\Documents\Intuit\QuickBooks\Sample Company Files\QuickBooks Enterprise Solutions 8.0\sample_product-based business.qbw;SERVER=QODBC;UseDCOM=Y; OptimizerDBFolder=C:\; OptimizerAllowDirtyReads=Y'

SELECT * FROM OPENQUERY(QB3, 'SELECT * FROM StandardTerms')

EXEC sp_dropserver @server = N'QB3'

 

The company file remains open for 60 seconds after I drop the linked server.  Is there any way to make the company file close immediately?

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2007-10-31 08:07:45

Actually 60 seconds is pretty good, I've had to wait up to 10 minutes sometimes when using web pages in IIS. This problem only happens when using Windows Services (or applications that call QODBC via a Windows Service) and QuickBooks unattended company "auto-login" mode.

I've seen some developers forcibly terminate the QBW32.exe task, but we obviously can't "officially" support that.

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to