我有一个包含两个代理的数据库,实际上不止两个,但现在有两个很重要。一个有效,另一个无效。两者都Uselsx '*lsxlc'
在(Options)
.
我已经注释掉了失败代理中的所有内容,除了
Dim s As New NotesSession
Dim db As NotesDatabase
Dim agentLog As NotesLog
Set db = s.CurrentDatabase
'agent log
Set agentLog = New NotesLog("Customers from Aging Report - AKM")
Call agentLog.OpenNotesLog( db.server, "agentinfo.nsf" )
agentLog.LogActions = True 'Set to True/False to turn on/off action logging
agentLog.LogErrors = True 'Set to True/False to turn on/off error logging
Call agentLog.LogAction("Start Agent: GetCustomerDataBasedOnAging")
On Error Goto throwError
Dim lcses As New LCSession
Dim src As New LCConnection(COutConn)
%REM
....
%END REM
Exit Sub
throwError:
'Error code
Dim epos As String
Dim emsg As String
Dim msg As String
Dim result As String
Dim status As Integer
Dim msgcode As Long
If lcses.status <> LCSUCCESS Then
status = lcses.GetStatus (result, msgcode, msg)
Call agentLog.LogError( msgcode,"Status for connector session is: " & Cstr(status) & Chr(10) & "Message: " & msg & " Code # " & Cstr(msgcode) & Chr(10) & "Connector Message: " & result )
emsg = "Customers from Aging Report' Agent: ("+Cstr(Erl)+") "& "[" &Cstr(Err) & "] [" & Error$ & "]"
Call agentLog.LogError( Err, emsg)
Else
emsg = "Customers from Aging Report' Agent: ("+Cstr(Erl)+") "& "[" &Cstr(Err) & "] [" & Error$ & "]"
Call agentLog.LogError( Err, emsg)
End If
Resume Next
COutConn 被定义为具有值“DB2”的常量
我在代理日志中收到以下错误:
Status for connector session is: 1544
Message: Code # 0
Connector Message: Error: Cannot find Connector 'DB2'
无论我使用常量 COutConn 还是“DB2”,都会发生这种情况。
奇怪的是,具有相同定义的另一个代理可以正常工作。我知道机器上存在 DB2,它是 i5/OS v5r4。DB2 内置在这个操作系统上。
我还需要寻找什么?