Calling Business Objects from Visual Basic

Hi all…submitting the following question to the group on behalf of an associate:

If I call Business Objects from Visual Basic and the user cancels from the Business Objects login screen my program hangs until I Kill it manually. Is it possible to time out the login or otherwise trap this error?

Sample code:
On Error Resume Next
Set BOApp = CreateObject(“BusinessObjects.Application”) If Err Then ’ <- Never reaches here just hangs if user cancels!!!
MsgBox "Unable to initiate BusinessObjects session. " & vbCrLf & _ Err & " - " & Error, vbOKOnly
End If

Thanks
Philip Biancucci
Fidelity Investments Institutional Services Company


Listserv Archives (BOB member since 2002-06-25)

I know of no direct way to do this, but I can suggest a workaround:

Prompt for userid and password from a VB dialog. Then, using one of the standard techniques to do a quiet login to BO, rename the BOMAIN.key file to some temporary name then create your BO instance. Once created, use the LoginAs() function to login using the variables you captured earlier. Don’t forget to rename BOMAIN.key back to the original name.

If you don’t like the rename BOMAIN.key technique your option is to shell an instance of the program using command line execution with login (ie, c:\businessobjects\busobj.exe -pass password -user username).

Hope That Helps.

Donald May
E-mail: maydp@pweh.com


Listserv Archives (BOB member since 2002-06-25)