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