Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Broken link read error
Message
De
16/01/2005 13:47:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00977609
Message ID:
00977611
Vues:
47
>Network table is opened and records are inserted with the SQL insert
>like:
>
>
>USE \\server\abc\table1
>i=1
>DO WHILE i < 10000
>  INSERT INTO table1 (field1) VALUES ("abcde")
>  i = i + 1
>Enddo
>
>
>Now when doing the SQL insert loop, plug the network cable off (simulating network link error) for a while and plug it then back. Start above code again -> errors within INSERT INTO:
>- File is in use by another user. (error 108)
>- Error reading file (error 1104)
>
>Do anyone know how to recover from the situation like this?

Well, at first, to make the code more robust, to be ready in such situation, I would put all that in a Try/Catch approach. You might want to probably put it outside the loop. Then, you can implement some kind of restart mechanism when that happens.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform