Connecting to a Local Company File
Follow the steps below to authorize with QuickBooks POS and connect to a company file when both QuickBooks POS and the component are running on your local machine.
- Open QuickBooks POS as an administrator and open the company file you want to connect to.
- Connect to QuickBooks POS. A dialog will appear in QuickBooks POS prompting you to authorize the component. After granting access to the component, you can now execute commands to QuickBooks POS.
-
If you want to connect to the company file when QuickBooks POS is closed, set the CompanyFile connection option when you execute commands. QuickBooks POS will open automatically in the background with the file specified.
Note that if QuickBooks POS is open through the application UI, only that CompanyFile can be used.
Connection Troubleshooting
If you receive a connection error (such as "Internal error 160002") you may need to switch QuickBooks POS to multiuser mode. This is done by selecting the "Switch Company File to Multi User Mode" option in the File Menu. You should then be able to connect to the company file.
If a CompanyFile is not specified in the connection string, QuickBooks POS may present an "Enter Company Name" window the first time you connect. In this window, you must specify the company file and the computer name where the company file is located.