- Jun 27, 2002
- 2,908
- 0
- 76
I have a Windows batch file that I wrote to automate interconnectivity between two database systems. (It massages the data along the way and uses various tools to get the job done.) Near the beginning of the script, I call a NET USE command to establish a connection to a network share where temporary data files will be stored during the operation.
I'm still debugging the code, but eventually I'd like to put it in a scheduled task and only worry about it when it breaks. Right now, I'm starting the code manually, and on a "cold" morning start, I get an error 53 from the NET USE. (My code has a lot of error trapping.) If I close the program and try it again seconds later, it works.
This pattern of working on a consecutive try is very repeatable. I'm tempted to write in a second attempt and move on, but I'm not comfortable with ugly code that I don't understand. I'll also have to support this code in the foreseeable future.
I'm still debugging the code, but eventually I'd like to put it in a scheduled task and only worry about it when it breaks. Right now, I'm starting the code manually, and on a "cold" morning start, I get an error 53 from the NET USE. (My code has a lot of error trapping.) If I close the program and try it again seconds later, it works.
This pattern of working on a consecutive try is very repeatable. I'm tempted to write in a second attempt and move on, but I'm not comfortable with ugly code that I don't understand. I'll also have to support this code in the foreseeable future.