Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record is out of range, in a locate statement
Message
De
03/09/2002 10:16:10
 
 
À
03/09/2002 09:41:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00696188
Message ID:
00696209
Vues:
17
Here is one code example of where the error is occuring. It occurs in the locate statement:

*****************************************************************
* this procedure checks to see if there is already a clockin *
*****************************************************************
cEmpNo=alltrim(thisform.empnobox.value)
cPayEmpNo='E'+substr((cEmpNo),3)
lClockedIn=.f.
cDate=dtoc(date(),1)
nNow=thisform.zTimeToMinutes( (Datetime()) )
If upper(right(cEmpNo,1))=='A' and nNow<=240
&&if second shift and time between 00:00 and 04:00 am
&&set date back one day
cDate=dtoc( (date(year(date()-1),month(date()-1),(day(date()-1)))),1 )
endif

SELECT bcshared
set order to forg_date descending
locate for forg_date=(cDate) and alltrim(fnction)=='F1' and alltrim(fempno)==(cEmpNo)
if found()
lClockedIn=.t.
endif
return lClockedIn

***************************************END OF EXAMPLE

The error happens on win98 or win2000 pro clients. NT4 Server. The table "bcshared" is a fairly large table, it grows at about 20k records per month. I just deleted a lot of old records reindexed and packed. But the error persists. The error only occurs randomly, I havent been able to recreate it myself. But it is being captured in my event log. I have 6 clients running the app and it happens at least once a week, so every 5000 records.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform