home *** CD-ROM | disk | FTP | other *** search
- * Test code for Schedule+ Appointment functions.
-
- * load the FLL
- SET LIBRARY TO foxmapi.fll
-
- * start a MAPI session.
-
- hmapisession = 0
- retval=mplogon(0, "", "", 3, 0, @hmapisession)
-
- * create cursors for recipients and restrictions.
-
- =mpcursor("MapiRecip", "")
- =mpcursor("SPlusRest", "SPlusRestr")
-
- * Set initial cursor values.
-
- SELECT mapirecip
- SET SAFETY OFF
- ZAP
- SET SAFETY ON
- APPEND BLANK
-
- REPLACE mapirecip.reserved WITH 0
- REPLACE mapirecip.recipclass WITH 0
- REPLACE mapirecip.name WITH ""
- REPLACE mapirecip.address WITH ""
- REPLACE mapirecip.eidsize WITH 0
- REPLACE mapirecip.entryid WITH ""
-
- * Set restriction cursor to find appointments for today.
-
- SELECT splusrestr
- SET SAFETY OFF
- ZAP
- SET SAFETY ON
- APPEND BLANK
-
- REPLACE splusrestr.reserved WITH 0
- REPLACE splusrestr.itemtype WITH "Appt"
- REPLACE splusrestr.resttype WITH "Day"
- REPLACE splusrestr.restdata WITH ""
-
- * Create a SPLUS session.
-
- hsession = 0
- retval=spbegin(0, 0, 0, 0, @hsession)
-
- itemid=SPACE(1)
-
- * Find first appointment for restrictions set in SPlusRestr.
-
- retval=spfindnext(hsession, 0, "MapiRecip", "SPlusRestr", "", 0, 0, @itemid)
- WAIT WINDOW "return from SPFindNext = " + STR(retval)
-
- * Read to appointment.
-
- retval=spreadappt(hsession, 0, "MapiRecip", itemid, 0, 0, "SPlusAppt", "SPlusAssoc", "SPlusAttd", "MapiAttd")
- WAIT WINDOW "return from SPReadAppt = " + STR(retval)
-
- IF retval = 0
- * Replace appointment text and save.
-
- SELECT splusappt
- GOTO TOP
- REPLACE splusappt.text WITH "Hello from foxprow"
-
- retval=spsaveappt(hsession, 0, "MapiRecip", "SPlusAppt", "SPlusAssoc", "SPlusAttd", "MapiAttd", 0, 0, @itemid)
- WAIT WINDOW "return from SPSaveAppt = " + STR(retval)
- ENDIF
-
- * Logoff from SPLUS and MAPI.
-
- retval=spend(hsession, 0, 0, 0)
- retval=mplogoff(hmapisession, 0, 0, 0)
-
- SET LIBRARY TO
-
-