General information
Category:
Coding, syntax & commands
Title:
Set Near - Question
Hello,
I have a table "student" that tracks which day a particular student takes a lesson, what time, which room, and with which instructor. In other words the pertinent fields are stu_day, stu_room, stu_bgntime and stu_endtime.
I have an index that is called stu_day which is str(stu_day)+stu_room+str(stu_bgntime).
Lets say I have a student scheduled for day 1, room 1 , and from 1:00pm to 2:00pm.
My problem is ... that if I set order to stu_day and do a seek on day 1, room 1 and bgntime of 1:30 I would like this particular student to be selected, However the index is set on stu_bgntime so this student will not be selected. If I "Set Near on" it will find the next record. Is there a way to do a find <= on an index in VFP. Or is the best way to do this to "Set Near On" and then if !found() do a seek -1 and then do some checking to make sure the time is "Between" stu_bgntime and stu_endtime and the day and room are correct?
Sorry if this is a stupid question.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only