Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Christof Wollenhaupt
  Where is Christof Wollenhaupt?
 Norderstedt
 Germany
 Christof Wollenhaupt
 To: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
Subject: RE: Error - Invalid Seek Offset
Thread ID: 190208 Message ID: 190754 # Views: 5 # Ratings: 0
Version: Visual FoxPro 9 Category: Network and Computer Management
Date: Friday, August 22, 2008 6:34:59 PM         
   



Hi Bernard,

> 1. I actually want to know if there is any way to trap that error in VFP instead of what happens now - the internal VFP error message is displayed, bypassing my OnError and Form.Error code.

If the error event is not firing in your case, that is, the error message is not the result of an error inside an error handler, than you can't catch it. There are workarounds, but they aren't simple SET commands:

- If you can track the error to certain lines of code, you can use the _Execute VFP API function. You need to write a small FLL that calls the function.

- If the affected part is more than a line but still relatively isolated, you can move it into a COM server. For the COM server you could specify additional options like enabling unattended server mode. If the COM server runs into error, you could shut it down from the main application and create a new instance.

- The error occurs when the network is temporarily not available and SMB sessions are closed. VFP cannot recover from such a error. If VFP opens a file and file becomes later unavailable, VFP won't open the file again. Therefore, you can minimize the error by minimizing the time that you open tables on the server.

- You could keep a file open on the server yourself and use LLFF like FREAD() to access the file. If this fails (FERROR), you know that you shouldn't try to access one of the tables, because that will trigger the ISO error.

- You could also move the data access code to the server on which the files reside. This turns file access into local file access and is less vulnerable. Use sockets, DCOM or web services for the communication between client and server.

The best way, though, is to fix the network.

--
Christof

ENTIRE THREAD

Error - Invalid Seek Offset Posted by Bernard Bout @ 8/20/2008 6:14:36 AM
RE: Error - Invalid Seek Offset Posted by Christof Wollenhaupt @ 8/20/2008 8:21:59 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/20/2008 6:32:43 PM
RE: Error - Invalid Seek Offset Posted by Christof Wollenhaupt @ 8/21/2008 9:47:10 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/22/2008 3:15:35 AM
RE: Error - Invalid Seek Offset Posted by Christof Wollenhaupt @ 8/22/2008 6:34:59 PM
RE: Error - Invalid Seek Offset Posted by Samir Ibrahim @ 8/20/2008 8:32:12 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/20/2008 6:33:42 PM
RE: Error - Invalid Seek Offset Posted by Richard Clarke @ 8/20/2008 9:57:58 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/20/2008 6:35:31 PM
RE: Error - Invalid Seek Offset Posted by Anil Sharma @ 8/20/2008 10:44:46 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/20/2008 6:37:37 PM
RE: Error - Invalid Seek Offset Posted by Anil Sharma @ 8/20/2008 7:11:03 PM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/21/2008 7:01:51 AM
RE: Error - Invalid Seek Offset Posted by Mike Yearwood @ 8/21/2008 3:59:07 PM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/22/2008 3:16:20 AM
RE: Error - Invalid Seek Offset Posted by Dale Dedoroy @ 8/20/2008 2:28:37 PM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/20/2008 6:40:24 PM
RE: Error - Invalid Seek Offset Posted by tushar @ 8/20/2008 6:59:17 PM
RE: Error - Invalid Seek Offset Posted by Dale Dedoroy @ 8/21/2008 3:53:54 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/21/2008 7:09:06 AM
RE: Error - Invalid Seek Offset Posted by suhas hegde @ 8/20/2008 10:11:24 PM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/21/2008 7:07:23 AM
RE: Error - Invalid Seek Offset Posted by suhas hegde @ 8/21/2008 9:31:41 AM
RE: Error - Invalid Seek Offset Posted by Anil Sharma @ 8/21/2008 2:05:10 PM
RE: Error - Invalid Seek Offset Posted by suhas hegde @ 8/21/2008 2:45:21 PM
RE: Error - Invalid Seek Offset Posted by Anil Sharma @ 8/21/2008 5:19:39 PM
RE: Error - Invalid Seek Offset Posted by suhas hegde @ 8/21/2008 6:53:02 PM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/22/2008 3:42:06 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/22/2008 4:00:34 AM
RE: Error - Invalid Seek Offset Posted by suhas hegde @ 8/22/2008 11:33:57 AM
RE: Error - Invalid Seek Offset Posted by suhas hegde @ 8/22/2008 7:03:26 PM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/23/2008 2:14:55 AM
RE: Error - Invalid Seek Offset Posted by Alex Grima @ 8/23/2008 11:04:35 AM
RE: Error - Invalid Seek Offset Posted by Bernard Bout @ 8/23/2008 4:20:22 PM
RE: Error - Invalid Seek Offset Posted by Alex Grima @ 8/23/2008 10:59:37 PM
RE: Error - Invalid Seek Offset Posted by Pete Sass @ 8/24/2008 3:35:12 PM