QuickBooks Integrator 2020 C++ Edition

Questions / Feedback?

OpenQBConnection Method

Opens a persistent connection to QuickBooks.

Syntax

ANSI (Cross Platform)
int OpenQBConnection();

Unicode (Windows)
INT OpenQBConnection();
- (void)openQBConnection;
#define MID_PURCHASEORDER_OPENQBCONNECTION 10

INQB_EXTERNAL int INQB_CALL InQB_PurchaseOrder_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

Invoking OpenQBConnection will open a persistent connection to QuickBooks. After invoking OpenQBConnection, all requests such as Get, Add, etc. will use the established connection until CloseQBConnection is invoked.

The effect of OpenQBConnection is to increase performance. If OpenQBConnection is not invoked, a connection to QuickBooks will automatically be created and destroyed each time the class communicates with QuickBooks. Using OpenQBConnection will be faster, particularly in the case of automatic login.

After OpenQBConnection is invoked, QuickBooks will issue a connection ticket, and it will be stored in QBConnectionString. When CloseQBConnection is invoked the ticket will be invalidated, and any further attempts to use it will fail.

Be sure to invoke CloseQBConnection when you have finished communicating with QuickBooks. Leaving an open QuickBooks connection may lock out other integrated applications, affect QuickBooks performance, or cause other problems.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2021 /n software inc. - All rights reserved.
QuickBooks Integrator 2020 C++ Edition - Version 20.0 [Build 7941]