Solved

Connection problems to Quickbooks via SDK in VBA

Posted on 2009-04-06
5
1,247 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now