save data in visual fox how to? |
Post Reply |
Author | |
roka
Newbie Joined: 20 December 2008 Location: Costa Rica Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 20 December 2008 at 12:52pm |
how could i do to save calendar data in a table or cursor in visual fox9?
|
|
Auge_Ohr
Groupie Joined: 20 December 2008 Status: Offline Points: 65 |
Post Options
Thanks(0)
|
hi,
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 |
|
Auge_Ohr
Groupie Joined: 20 December 2008 Status: Offline Points: 65 |
Post Options
Thanks(0)
|
hi,
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |