Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems accessing names.nsf from VFP
Message
Information générale
Forum:
Lotus Notes
Catégorie:
Lotus Script
Divers
Thread ID:
00431425
Message ID:
00431467
Vues:
11
>im trying to access the address book of lotus from VFP using this code
>and when executes this line ...>StrName = DomItem.Value(0)
>im getting an ole error code 'unknown name' does anybody help me to understand whats wrong with this code?
>
>Domsession = createobject("Notes.Notessession")
>DomDir = Domsession.GetDatabase("","names.nsf")
>DomContacts = DomDir.GetView("People")
>DomDoc = DomContacts.GetFirstDocument()
>DomItem = DomDoc.GetFirstItem("LastName")
>if vartype(DomItem) = "O" then
> StrName = DomItem.Value(0)
>endif
>
>thanks in advance

It looks like vartype() can not be used because Notes will return an object reference even if the item doesn't exist. It's not a NULL reference, it's just empty. Use type("DomItem.Name") = "C" to check if GetFirstItem returned a valid object.

Also, I had a typo in what I previously posted on this subject. It's DomItem.Values(0) not DomItem.Value(0).
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform