Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File is not open. Error 1113
Message
De
09/02/2013 17:07:08
 
 
À
09/02/2013 16:46:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01565618
Message ID:
01565656
Vues:
43
>>>>>>Hi,
>>>>>>
>>>>>>What is an example of a "bad" code that would produce error "File is not open"? I get an error report from a customer that shows this error message. The place is Init method of a form. I can't find what would produce this error. And I can't create a "test" line of code that would produce this error message. If I can produce this error maybe it will clue me on what is "wrong" in the Init method.
>>>>>
>>>>>To simulate the error (if that's the error I have in mind), create a dbf on a thumbdrive, open it, pull out the flash drive, then try to scan that table. As soon as your navigation goes out of what's covered in the current buffer, Fox should ask for the next block from the disk and you should get this error. Or just try updating a record in it.
>>>>
>>>>Thank you very much. I will try to simulate this error but without a thumbdrive, if I can.
>>>>
>>>>What I don't understand is that when you say "try to scan" the table. Usually Scan starts with SELECT (AliasName), then SCAN. But if I SELECT an alias that does not exist, I will get a different error. What am I missing in the SCAN?
>>>
>>>Select (alias) will not cause disk activity. It will just make the buffers for that alias the currently selected ones. During the scan, however, if the table is long enough, Fox will ask for some blocks that aren't in the buffers - and the OS will try to get them from the missing disk. It will bang.
>>
>>Thank you. I will think of how this scenario can apply to my code where the customer is getting the error.
>
>Maybe the same thing would happen if you opened a table on a network drive, then lost the network connection. Maybe your customer is using a (flaky) wireless connection.

That would make sense; except. The error happens in the INIT method of the form. The INIT method in itself should be fairly fast. It is doubtful to me that during this second or a fraction of a second he opens the file and then loses connection. Also, this problem happens from time to time in exactly the same place (same INIT method). So I think most likely I (my code) is overlooking something.
"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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform