developerWorks  >  Lotus  >  Forums & community  >  Enterprise Integration Forum

Enterprise Integration Forum

developerWorks




'Invalid property' error from 'SetProperty' method
App Devlmnt 06/10/2010 05:42 PM
LEI All Releases Windows


I'm running agent code that's nearly identical to what appears below which was posted by Andre Guirard at openntf.org.

In the For Loop after i = 8, the line with SetPropertyStream fails (Error:Invalid property '6', Connector 'oracle', Method-SetProperty-)

The connection doc in the LEI db contains the following:

PDMDGROUP (Text)
PLOCK_KEY (Text)
PLOC_LIST (Text)
PSTARTDATE (Text)
PTYPE (Text)
PTYPE_LIST (Text)

I'd appreciate any ideas on why this error occurs. ______________________________________

Private Sub SetPropertiesFromDoc(docCon As NotesDocument, lccon As LCConnection, _
Byval baseOnly As Boolean)
' Given a NotesDocument (which is expected to be a connection doc)
' and an LCConnection, loads the connection properties from the
' document into the connection. If baseOnly flag is true, the
' connection doc may not be a metaconnection, or an error results.
On Error Goto oops
On Error 12555 Resume Next ' if property doesn't exist, ignore error.
Dim tokens, names
With docCon
tokens = .GetItemValue("PropTokenList")
names = .GetItemValue("PropNameList")
Dim fval As New LCStream
Dim i%
For i = Lbound(tokens) To Ubound(tokens)
If names(i) <> "Library" And names(i) <> "Name" And names(i) <> "Link" Then
fval.Text = .GetItemValue(names(i))(0)
Call lccon.SetPropertyStream(tokens(i), fval)
End If
Next

Go back