ConnectDirectly
Specifies whether to connect directly to QuickBooks without using the QuickBooks Gateway. Use this property for direct communication with QuickBooks under specific conditions, such as matching application bitness and user permissions.
Data Type
bool
Default Value
false
Remarks
QuickBooks 2022 and later is available as both a 32-bit and 64-bit process. To establish a direct connection, ensure that the application matches the bitness and permissions of the QuickBooks process. For example, if QuickBooks is running with the "Run as Administrator" option, the application must also run with the same permissions.
QuickBooks Versions Prior to 2022
Earlier versions of QuickBooks are limited to a 32-bit COM process. Direct connections to these versions require a 32-bit application running under the same user account and permissions as QuickBooks. Direct connections are recommended only for advanced users or developers who are familiar with QuickBooks integration.
Setting CompanyFile
When using ConnectDirectly, always specify the CompanyFile property. This ensures the correct company file is used, even if a different one is already open in QuickBooks or if QuickBooks is closed.
Connecting Directly from 32-Bit Applications
For QuickBooks versions before 2022:
Only 32-bit applications can establish a direct connection. The application must run under the same user account and permissions as QuickBooks. If QuickBooks is running as an administrator, the connecting application must also use "Run as Administrator".
Property Precedence
The ConnectDirectly property is ignored if either of the following conditions is met:When ConnectDirectly is set to false, and URL and UseRDS are not set, the component uses the QuickBooks Gateway for connectivity.
Compiling Applications
For applications connecting to QuickBooks versions prior to 2022:
Compile the application as x86 to ensure compatibility with QuickBooks’ 32-bit COM process.