Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record is out of range
Message
De
22/11/2002 08:44:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Record is out of range
Divers
Thread ID:
00725708
Message ID:
00725708
Vues:
39
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform