Connect To OLEOBJECT

If you are a Power Builder developer and have any questions about using our products from Power Builder here is the place to post them.
Post Reply
hard_u
Posts: 1
Joined: Mon Jan 09 2006
Contact:

Connect To OLEOBJECT

Post by hard_u » Mon Jan 09 2006

I make user-object in application-server that uses dll file. Sometimes the user-object can't connect to the dll file. This application-server is used by many application-client (about 100 clients simultaneously). Here is the code:

oleobject ascon
integer ll_status
string msg

ascon = create OLEObject

ll_status = ascon.connecttonewobject( "BKPN.AS400OLE" )
IF ll_status <> 0 THEN
/* fails */
msg = "BKPN.AS400OLE of server failed. Contact your help desk"
else
/* succeeds */
end if

Any idea why this happens? Is there any solution?

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Mon Jan 09 2006

Hello,

Your above question is not about one of our products but about OleObjects in general.

I guess this happens if two or more clients machine try to connect to the Ole object in the same time. The solution can be to manage multithreading in your application or to implement a kind of time delay between each connection to the Ole and the one that will follow.

I am sure that if you post this message to the forum of the Powerbuilder community the guys there will be of more help.

When you resolve this issue please post the solution here, i am sure it will help other developers.

Thank you.

Post Reply