home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / fox / workgrp / sp_appt.prg < prev    next >
Text File  |  1993-09-02  |  2KB  |  71 lines

  1. SET LIBRARY TO foxmapi.fll
  2.  
  3. hmapisession = 0
  4.  
  5. retval=mplogon(0, "", "", 3, 0, @hmapisession)
  6.  
  7. =mpcursor("MapiRecip", "")
  8. =mpcursor("SPlusRest", "SPlusRestr")
  9.  
  10. SELECT mapirecip
  11. SET SAFETY OFF
  12. ZAP
  13. SET SAFETY ON
  14. APPEND BLANK
  15.  
  16. REPLACE mapirecip.reserved WITH 0
  17. REPLACE mapirecip.recipclass WITH 0
  18. REPLACE mapirecip.name WITH  ""
  19. REPLACE mapirecip.address WITH  ""
  20. REPLACE mapirecip.eidsize WITH  0
  21. REPLACE mapirecip.entryid WITH  ""
  22.  
  23. SELECT splusrestr
  24. SET SAFETY OFF
  25. ZAP
  26. SET SAFETY ON
  27. APPEND BLANK
  28.  
  29. REPLACE splusrestr.reserved WITH 0
  30. REPLACE splusrestr.itemtype WITH "Appt"
  31. REPLACE splusrestr.resttype WITH "Day"
  32. REPLACE splusrestr.restdata WITH ""
  33.  
  34. hsession = 0
  35.  
  36. retval=spbegin(0, 0, 0, 0, @hsession)
  37.  
  38. itemid=SPACE(1)
  39.  
  40. retval=spfindnext(hsession, 0, "MapiRecip", "SPlusRestr", "", 0, 0, @itemid)
  41. WAIT WINDOW "return from SPFindNext = " + STR(retval)
  42.  
  43. retval=spreadappt(hsession, 0, "MapiRecip", itemid, 0, 0, "SPlusAppt", "SPlusAssoc", "SPlusAttd", "MapiAttd")
  44. WAIT WINDOW "return from SPReadAppt = " + STR(retval)
  45.  
  46. SELECT mapirecip
  47. LIST
  48. SELECT splusappt
  49. LIST
  50. SELECT splusassoc
  51. LIST
  52. *select SPlusAttd
  53. *list
  54. *select MapiAttd
  55. *list
  56.  
  57. IF retval = 0
  58.     SELECT splusappt
  59.     GOTO TOP
  60.     REPLACE splusappt.text WITH "Hello from foxprow"
  61.  
  62.     retval=spsaveappt(hsession, 0, "MapiRecip", "SPlusAppt", "SPlusAssoc", "SPlusAttd", "MapiAttd", 0, 0, @itemid)
  63.     WAIT WINDOW "return from SPSaveAppt = " + STR(retval)
  64. ENDIF
  65.  
  66. retval=spend(hsession, 0, 0, 0)
  67. retval=mplogoff(hmapisession, 0, 0, 0)
  68.  
  69. SET LIBRARY TO
  70.  
  71.