General information
Category:
Coding, syntax & commands
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.
Previous
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