Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record is out of range
Message
From
22/11/2002 08:58:36
 
 
To
22/11/2002 08:44:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00725708
Message ID:
00725717
Views:
7
>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')
SWAG - have you tried removing the () from around lcKey; ie:
IF indexSEEK(lcKey,.f.,'bcshared','rkey')
>	RETURN .t.
>ELSE
>	RETURN .f.
>endif
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform