"Error creating product object" on the line Set src = New LCConnection ("db2").
I do not reference to the uidoc during the code. Do you have any ideas?
Without the session object and subsequent test in the error handler, failure while creating a connection to DB2 generates the LotusScript message, "Error creating product object". However, for the same error condition, the LSX reports "Error: Cannot load LSX library 'db2'."
Handler: If (Session.Status <> LCSUCCESS) Then Messagebox Session.GetStatusText, 0, "The following Lotus Connector error has occurred" Else Messagebox Error$, 0, "The following LotusScript error has occurred" End If End End Sub
This is not an uncommon problem. It means that the interface to DB2 cannot be loaded. The usual cause of this is that the machine doesn't have a DB2 client installed. Less commonly, it's possibly that the DB2 client is installed, but the Path statement is wrong, so the DB2 DLLs cannot be loaded.
The way out of this is to re-install the DB2 client and make it correct. Use the DB2 client functionality to connect to a DB2 server -- which you will need to do to catalog the DB2 database to be used or you'll get an error when you try to connect to it. The very act of cataloging it shows the DB2 client is installed; if at the end of cataloging a database you can test-connect to it, the client works.
Also, remember that if the code that connects to DB2 runs on the Lotus Notes client, you need a DB2 client installed on every Lotus Notes client machine. It's better to try to design the application so that it only needs DB2 connection from the Domino server, if possible.
Do you have comments on this Ask the Expert Q&A? Let_us_know.
This was first published in January 2006