with UserSession.FDEventsTable do
begin
CancelRange;
IndexFieldNames := 'StartTime';
SetRangeStart;
FieldByName('StartTime').Value := EncodeDate(2016,4,11);
SetRangeEnd;
FieldByName('StartTime').Value := EncodeDate(2016,4,17);
ApplyRange;
First;
with IWScheduler.JQSchedulerOptions do
begin
with EventItems do
begin
Clear;
while not EOF do
begin
TIWLimoPoolEvent.CreateFromDataSet(Add).Free; // This is an object which populates the newly added Event in its
// constructor.
Next;
end;
end;
Reload;
View:=svWeek;
end;
end;
This does not seem to always work. It depends on what the JQScheduler.JQSchedulerOptions.View previously was. When view changes from svMonth to svWeek or to svDay in SA version no error results and no events are shown in ISAPI version however I get "URL too Long" error message. To debug this I check to see if the SetRangeStart/ApplyRange is returning the correct number of Rows. This is working fine. Then
I also check EventItems.Count and in every case the number of Events loaded to EventItems corresponds to the number of events read from
the Table.
Can anyone see a mistake here?
Thanks