Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - save data in visual fox how to?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

save data in visual fox how to?

 Post Reply Post Reply
Author
Message
roka View Drop Down
Newbie
Newbie


Joined: 20 December 2008
Location: Costa Rica
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote roka Quote  Post ReplyReply Direct Link To This Post Topic: save data in visual fox how to?
    Posted: 20 December 2008 at 12:52pm
how could i do to save calendar data  in a table or cursor in visual fox9?
Back to Top
Auge_Ohr View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote Auge_Ohr Quote  Post ReplyReply Direct Link To This Post Posted: 25 December 2008 at 2:45pm
hi,
Originally posted by roka roka wrote:

how could i do to save calendar data  in a table or cursor in visual fox9?

good Question ... i´m working with Xbase++ on same.

Information you will get from CalenderHitInfo
*** snip ***
METHOD Calender:EditCell(oHitInfo)

   CalendarViewEvent := oHitInfo:ViewEvent

   IF CalendarViewEvent == NIL
*      MSGBOX("do you want to create a new Entry ?")
      nAction := ID_FILE_NEW

   ELSE
      nAction := ID_FILE_EDIT

      CalendarEvent     := CalendarViewEvent:GetProperty("Event")
      CalendarEventRecurrenceState := CalendarEvent:GetProperty("RecurrenceState")

      DO CASE
         CASE CalendarEventRecurrenceState = xtpCalendarRecurrenceNotRecurring
         CASE CalendarEventRecurrenceState = xtpCalendarRecurrenceMaster
         CASE CalendarEventRecurrenceState = xtpCalendarRecurrenceOccurrence
         CASE CalendarEventRecurrenceState = xtpCalendarRecurrenceException
      ENDCASE

      cBody                       := CalendarEvent:Body
      cCreationTime               := CalendarEvent:treatDateAsString(.T.):GetProperty("CreationTime")
      cEndTime                    := CalendarEvent:treatDateAsString(.T.):GetProperty("EndTime")
      cLastModificationTime       := CalendarEvent:treatDateAsString(.T.):GetProperty("LastModificationTime")
      nLabel                      := CalendarEvent:Label
      cLocation                   := CalendarEvent:Location
      lMeetingFlag                := CalendarEvent:MeetingFlag
      lPrivateFlag                := CalendarEvent:PrivateFlag
      lReminder                   := CalendarEvent:Reminder
      nReminderMinutesBeforeStart := CalendarEvent:ReminderMinutesBeforeStart
      cReminderSoundFile          := CalendarEvent:ReminderSoundFile
      nScheduleID                 := CalendarEvent:ScheduleID
      cStartTime                  := CalendarEvent:treatDateAsString(.T.):GetProperty("StartTime")
      cSubject                    := CalendarEvent:Subject
      nImportance                 := CalendarEvent:Importance

      MSGBOX("Body             "+Trim(cBody)             +CRLF+;
             "CreationTime     "+cCreationTime           +CRLF+;
             "EndTime          "+cEndTime                +CRLF+;
             "LastModification "+cLastModificationTime   +CRLF+;
             "Label            "+STR(nLabel)             +CRLF+;
             "Location         "+cLocation               +CRLF+;
             "MeetingFlag      "+IF(lMeetingFlag,"Y","N")+CRLF+;
             "PrivateFlag      "+IF(lPrivateFlag,"Y","N")+CRLF+;
             "Reminder            "+IF(lReminder   ,"Y","N")+CRLF+;
             "ReminderMinutes  "+STR(nReminderMinutesBeforeStart)+CRLF+;
             "ReminderSoundFile"+cReminderSoundFile      +CRLF+;
             "ScheduleID       "+STR(nScheduleID)        +CRLF+;
             "StartTime        "+cStartTime              +CRLF+;
             "Subject          "+cSubject                +CRLF+;
             "Importance       "+STR(nImportance) )

    DoMore(oHitInfo,nAction)

*** eof ***
so far so good, BUT ...

with Xbase++ we have WorkSpaceArea for each Thread
i do open a DBF in MAIN.

*** snip ***
PROCEDURE DoMore(oHitInfo,nAction)
 
 MsgBox("Alias is "+ALIAS() )

*** eof ***
Xbase++ does say NO ALIAS(), no open DBF ... ? where is it ?

While CJ Calender is a activeX ... does CJ Calender run as seperate Thread ?
... and to :open DataProvider is use a ConnectionString ... does CJ use a own Workspace(Area) so that i can not use it together with Xbase++ DBF ?

in DataProvider there are "buildin" datalink to Access
*** snip ***
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\events.mdb"
*** eof ***
while DBF can also used by "Microsoft.Jet.OLEDB.4.0" i like to ask if someone know Syntax and Structure to use a DBF ?

have a nice Xmas



greetings by OHR
Jimmy
Back to Top
Auge_Ohr View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote Auge_Ohr Quote  Post ReplyReply Direct Link To This Post Posted: 02 January 2009 at 12:46am
hi,
Originally posted by roka roka wrote:

how could i do to save calendar data  in a table or cursor in visual fox9?


https://forum.codejock.com/forum_posts.asp?TID=11514&KW=GetEvent&PID=38651#38651

i found the Answer in that Thread here in Newsgroup : you have to use a DataProvider as "Custom".

*** snip ***
METHOD Calender:OpenData()
LOCAL Retvar := .T.
LOCAL cConnectionString

   USE (ZPATH+"CALENDAR.DBF") VIA "DBFNTX"
   SET INDEX TO (ZPATH+"CALDATE1.NTX")

   //
   // this is "the" String
   //
   cConnectionString := "Provider=Custom;"

   //
   // do not forget to "set" Provider
   //
   ::oCalcon:setdataProvider(cConnectionString)

   //
   // open connetion, if fail try create (do not work with DBF )
   //
   IF .NOT. ::oCalcon:DataProvider:Open()
      //
      // IMHO this does not work with "Custom" ... 16 byte is what you get
      //
      ::oCalcon:DataProvider:Create()
      Retvar := .F.
   ENDIF

   IF Retvar = .T.
      //
      // fill Calender with all Records
      //
      ::DoFromDBF("ALLRECORD")
   ENDIF

RETURN Retvar
*** eof ***
now also "Problem" of "lost" ALIAS() are gone and you can use all DoXXXX Method (search in help for "DoXXXX").

for more Information you may want to join XCodeJock Project.
it will use Xbase++ and Express++ but Source Code as "native" Xbase++ is also include.
we want to write "Wrapper" for almost all CodeJock OCX and did most allready

hope it is allowed to post URL ? i do it (not my Site):
http://www.donnay-software.com/

greetings by OHR
Jimmy


greetings by OHR
Jimmy
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.