LotusScript DB2 stored procedure call 
Use this IdeaSpace to post ideas about Lotus Enterprise Integrator.

: -22
: 0
: 22
: Lotus Enterprise Integrator
: LEI, DB2, Stored procedure
: Alex Shinkarenko115 15 Jun 2009
: / Email
I'm trying to call a stored procedure on my DB2 database. I wrote the procedure and I think it works (it compiles!!!). Anyway, when I try to call it from a lotusscript agent I can't get it to work. All that is returned is: "1544 Cannot find connector 'db2'". Anybody have any suggestions?

Sub Initialize
On Error Goto handler

Dim Session As New NotesSession
Dim SessLC As New LCSession
Dim src As New LCConnection ("db2")
Dim fields As New LCFieldList
Dim results As New LCFieldList
Dim fieldIn As LCField
Dim fieldOut1, fieldOut2 As LCField
Dim Count As Long

src.Database = "server"
src.Userid = "user"
src.Password = "password"
src.MapByName = True

src.Procedure = "evixords"

Set fieldIn = fields.Append("inParm", LCTYPE_NUMERIC)
fieldIn.value = 1

Set fieldIn = fields.append("OutParm1", LCTYPE_TEXT)
Set fieldIn = fields.append("OutParm2", LCTYPE_TEXT)

Print "Calling the stored procedure..."
If (src.call(fields, 1, results)=0) Then
Print "Stored procedure called successfully."
Set fieldOut1 = results.getfield(1)
Set fieldOut2 = results.getfield(2)
Call src.fetch(results)
Print FieldOut1.text(0)
Print "There was an error...."
End If


If (sesslc.Status <> LCSUCCESS) Then
Print "The LC error occured: " ; sesslc.Status & ": " & sesslc.GetStatusText
Elseif Error$ <> "" Then
Print "the LS error occured: ";Error$
Print "Completed ok"
End If
End Sub

1) Peter von Stöckel5721 (15 Jun 2009)
This is not a forum. You might try your question here: { Link }
2) Bruce Elgort12540 (16 Jun 2009)
Alex you may want to withdraw this entry since it isn't an "idea". Let me know if you need any help and/or clarification.


Welcome to IdeaJam

You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>

IdeaJam developed by

Elguji Software Logo