Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Seek Offset
Message
 
 
To
07/05/2019 09:09:32
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01668410
Message ID:
01668435
Views:
44
>>>Hi,
>>>
>>>The error (in the title of this thread) is the worst and most dreadful since it is not caused by a bug or bad code but rather the issue with the PC memory (as far as I know). I used to think that the error only happens when the app opens an external DBF file. But lately I see these error (emailed from the app) on attempting to USE/OPEN a DBF included in the .EXE
>>>My usual suggestion to a customer coming across this error is to reboot the PC.
>>>Any other suggestions on troubleshooting this error?
>>>
>>>TIA
>>
>>Another question on this topic. The error that I am troubleshooting occurred in a method of a BIZ object. The error is when the code SELECTs a record from a meta table (not USE the meta table). That is, the code selects a record from the meta table and sets values in the properties of the BIZ object based on the selected record.
>>Further down, in the sequence of code in INIT method, this BIZ object executes another method. The second method depends on the first method (the one where error occurred).
>>And from the error email I received from the customer, the second method didn't have any problem. That is, the second method successfully executed.
>>Does it mean that even though the error Invalid Seek Offset happened, the record from the meta table was selected? And in this case, I can simply ignore the Invalid Seek Offset error (in CATCH).
>>Does the above make sense?
>
>I would never ignore the error.
>
lnRetries = 0
>DO WHILE lnRetries < 3
>    TRY
>        && Execute your command here
>        llError = .f.
>    CATCH
>        llError = .t.
>    ENDTRY
>    IF NOT llError
>        EXIT
>    ENDIF
>    lnRetries = lnRetries + 1
>ENDDO
>
>IF lnRetries >= 3
>    * Report hard failure
>    EXIT / RETURN / QUIT / whatever
>ENDIF
>
>Something like that would be my logic.

Thank you for your input!

I agree that in general sense ignoring an error is not a good idea. But in this case of the Invalid Seek Error, maybe it makes sense (of course logging it silently without the user being notified).

If you replace your && Execute your command here with
select * from somemeta where id = '123'
I could, according to your code, go back and execute this SQL Select again. But what if, in spite of the error, the SQL Select got the record? What if Invalid Seek Offset is a "benign" error?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform