Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Broken link read error
Message
From
16/01/2005 13:47:06
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 5
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00977609
Message ID:
00977611
Views:
49
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform