Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Error calling external object function of an oleobject – PB Docs 2022 – PowerBuilder Library

Error calling external object function of an oleobject – PB Docs 2022

Error calling external object function of an oleobject

Symptom

Using OLE to connect to the Quick Books CoreObjX70PB activex
control and getting an error calling the Connect function.

Environment

PowerBuilder

Reproducing the Issue

The following code was used to connect to the
CoreObjX70PB.QBConnection: The Connect function is where the error
message was being thrown.

Cause

The error was due to the fact that this was a first time
connection to the CoreObjX70PB.QBConnection object. The customer
determined that Quick Books was set up to run as multiuser.  They had to
set it back to single user in order to connect.

See the “Resolution” section below to see how to get the actual
error message being returned by the oleoject. 

Solution

Do the following to get the actual error message from the
oleobject:

1.  Instead of using an oleobject variable create a PowerBuilder
standard class non-visual object (nvo) of type oleobject:

tr_081.png

2.  Code a messagebox in the externalexception event of the
nvo.  Capture the resultcode and description of the externalexception
event:

tr_082.png

3.  When the following code executes, the oleobject error from the
externalexception event will display in the messagebox:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x