Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record is out of range
Message
From
22/11/2002 08:44:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Record is out of range
Miscellaneous
Thread ID:
00725708
Message ID:
00725708
Views:
38
I posted this a couple months ago, after trying all the suggestions, the error is still recurring. It happens about 10 times a month and the event fires about 6000 times a month. My users are just living with it at the moment.

I have rebuilt the indexes on all my tables.
I changed my locate statement to a Seek

Below is the offending code, the "record is out of range" error occurs at the INDEXSEEK line. bcshared is the table being searched. It has a regular key on date.Employee Number.clock-in function:

*****************************************************************
* this procedure checks to see if there is already a clockin *
*****************************************************************
LOCAL lcEmpNo, lcDate, lnNow
lcEmpNo=alltrim(thisform.empnobox.value)
lcDate=dtoc(date(),1)
lnNow=thisform.zTimeToMinutes( (Datetime()) )
If upper(right(lcEmpNo,1))=='A' and lnNow<=240
&&if second shift and time between 00:00 and 04:00 am
&&set date back one day
lcDate=dtoc( (date(year(date()-1),month(date()-1),(day(date()-1)))),1 )
endif

SELECT bcshared

LOCAL lcKey
lcKey=ALLTRIM(lcDate)+'.'+ALLTRIM(lcEmpNo)+'.'+'F1'
IF indexSEEK((lcKey),.f.,'bcshared','rkey')
RETURN .t.
ELSE
RETURN .f.
endif
Next
Reply
Map
View

Click here to load this message in the networking platform