Getting Three Fields From Calendar Profile Of  Notes database file Using Lotus Notes C APi's From C++

Posted on 2006-04-13
Last Modified: 2013-12-18
  I need to get the values of three Fields present in the Calendar Profile of lotus notes  user mail database file (ex: joe.nsf)  through Notes C Api's from C++ , can you please  provide me a solution for this problem (program sample if possible),

fields That are To be Accessed are


they are present in

lotus notes -->calender-->Tools-->Preferences-->  
            Calendar & ToDo -->Display
 in lotus notes client 6.5

My environment includes

Language : C++ (VC++ 6.0)
Apis -- Lotus Notes C Api's version 6.0
Mail Client : Lotus Notes Client 6.5
Profile Document : Calendar profile of any User's Mail database file (.nsf)

thanks & Regards
Question by:SueshPadmanabhan
    LVL 46

    Expert Comment

    by:Sjef Bosman
    sjef_bosman wrote in http:Q_21809349.html#16426072 "How to Getdata using VIEW_CALENDAR_FORMAT ?>>>>>>>>>>>>>>>>>>>>>>>":
    > By the way, what are you trying to accomplish?
    The description you gave is clear. But how far did you get yourself? Why are you using C? What are you going to use the application for? Is it impossible to do it inside Notes, in LotusScript?

    By the way, there are 2 API's: the C-API and the C++-API, less complete but easier to understand form a LotusScript perspective.

    PS You could have asked to reopen the question you accidentally closed...
    LVL 22

    Accepted Solution

    Hi SueshPadmanabhan,
    to access the calendar profile doc use LNDatabase object's method:
        LNSTATUS OpenCalendarProfileDocument(const LNString &owner, LNCalendarProfileDocument *profile)

    to change the profile's item's value use:
        LNSTATUS SetProfileField(const LNString &fieldname, const LNItem &item)

    which is LNProfileDocument method (LNCalendarProfileDocument base class).

    Hope this helps,
    LVL 22

    Expert Comment

    you have the example of getting the mail db's calendar profile in the sample program (commes with C++ API) called "profile" (NotesCppFolder\Samples\profile).

    Instead of method OpenCalendarProfileDocument( "", prof ) you can call:

        LNSTATUS OpenProfileDocument (const LNString &name, const LNString &owner, LNProfileDocument *profile)

        - "CalendarProfile" or LNPROFILECALENDAR as name argument,
        - empty string as owner,
        - profile as declared LNProfileDocument* (here the profile pointer will be stored)

    After that use GetProfileField and SetProfileField to read/modify the items.

    Hope this helps,

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
    Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now