Solved

Connection problems to Quickbooks via SDK in VBA

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

630 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