Solved

Connection problems to Quickbooks via SDK in VBA

Posted on 2009-04-06
5
1,289 Views
Last Modified: 2013-11-27
I am trying to connect to Quickbooks from an Access database using the Quickbooks SDK. I have my code sample below. The problem is that even though I have the open connection set up to be multiuser mode, somehow that property gets lost. Also, sometimes the computer that runs the commands becomes the host computer instead of the server remaining the host.

This problem does not happen every day. It does not seem to matter if the person using the SDK code is the only one in the system when the status changes. Sometimes it seems like something happens during the night (like during a backup or something).  We have gone a couple weeks where everyone logs in just fine in multiuser mode, the one day the problem comes back for a few days, then goes away again.

We recover from this by having everyone log out of quickbooks, then have the server manager search for the quickbooks database. Once we "find" the database again, it seems to reset the settings.
Is there something wrong in my code or in the server settings that would be causing this?

        SessionManager.OpenConnection2 "", appName, ctLocalQBD
        DTCompanyFile = DLookup("Default_Company", "Configuration_Table")
        SessionManager.BeginSession DTCompanyFile, omMultiUser

Open in new window

0
Comment
Question by:jadixon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:jadixon
ID: 24077571

        SessionManager.OpenConnection2 "", appName, ctLocalQBD
        DTCompanyFile = DLookup("Default_Company", "Configuration_Table")
        SessionManager.BeginSession DTCompanyFile, omMultiUser

Open in new window

0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24144581
Have you tried just contacting Quickbooks?
0
 

Accepted Solution

by:
jadixon earned 0 total points
ID: 24281225
After doing a bit of research it seemed to be a networking-type issue. So I went into the users etc\hosts file and added an entry for the server where the quickbooks resides. Since I have done that there does not seem to be an issue anymore. It has been several weeks since we had the lockout error. I am keeping my fingers crossed that this is really the cure!
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24283201
OK

Keep me posted.

;-)

Jeff
0
 

Author Comment

by:jadixon
ID: 24380109
The ETC Hosts fix so far has worked. I will now close this out (until the problem happens again).
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question