Error when run Evaluate( strFormula, doc ) on server

One of our databases allows users to select a part # from the list. List is populated by the run on server agent which returns list of parts. (code blow).

Dim s As New NotesSession Dim agent As NotesAgent Set agent = s.CurrentAgent Dim db As NotesDatabase Dim doc As NotesDocument Dim PartNo As String Set db = s.CurrentDatabase Set doc = db.GetDocumentByID(agent.ParameterDocID) PartNo = doc.AssyNo(0) strFormula = { @Unique( @DbCommand( “ODBC” : “NoCache” ; “SQL” ; “USER” ; “" ; “QUERY” )) } strFormula1 = { @Unique( @DbCommand( “ODBC” : “NoCache” ; “IBM AS400” ; “USER” ; "*” ; “QUERY”) } varList = Evaluate( strFormula, doc ) varList1 = Evaluate( strFormula1, doc ) varList = ArrayAppend(varList, varList1) Dim item As NotesItem Set item = doc.ReplaceItemValue( “PartsList”, sortVariant(varList) ) Call doc.Save( False, True )

This agent was working for the last 10 years until last weekend upgrade to 9.01

Does anybody experienced similar problem.

Regards

Robert

Subject: Some questions

There are a lot of potential failure points in that code. It’d be helpful to have the error message, if any.

  • What note ID is being returned by ParameterDocID?
  • Does this ID still exist in the database, and does the signer of the agent have access rights to it?
  • I assume that PartNo is used in the DbCommand query, are they seeing a valid value for it?
  • Do the DbCommands return the formulas they expect?
  • What happens if they hard-code the formula into the Evaluate function?

Subject: and it seems you need NotesSQL tool update for ODBC

theres likely a requirement to have the NotesSQL upgraded on your server if you have move up to this level.
There’s was this catch with the early Notes 9.00 version:
http://www-10.lotus.com/ldd/ndsebetaforum.nsf/topicThread.xsp?action=openDocument&documentId=5B4BA5565A8B9C3785257B32006FBC3B http://www-10.lotus.com/ldd/ndsebetaforum.nsf/topicThread.xsp?action=openDocument&documentId=5B4BA5565A8B9C3785257B32006FBC3B

Check out if there’s a working IBM ODBC driver (former NotesSQL) for Notes 9 out…here:
IBM Developer http://www.ibm.com/developerworks/lotus/toolkits.html