I am helping a non-technical friend resolve a problem with a VB application. The original programmer is unable to be contacted. This tiny 40kb program reads a setup.txt file, establishes a telnet into a device, issues a data dump command, then takes that data, parses and reformats it, then pushes it out to a MySQL db on a linux box. The program is normally repeatedly executed at 5 minute intervals using Scheduled Tasks. It ran fine for nearly 2 years, then a few months ago it quit working and started throwing the Run-time Error 54: Bad File Mode. I haven't done any VB work in years, but I do recall that this is typically a programming error. The program also creates a log file; the log entry after each attempted run is "Error Occured: Input past end of file."

However, the program hasn't changed, nor did the setup.txt configuration file.

That leaves two possibilities as I see it...

- the data obtained from the device is formatted differently.
- something on the XP PC has changed, such as a dependent DLL.

The firmware on the device has been upgraded several times since the program was first used, but my friend says that the most recent firmware update was done several months before this system broke. Just to be sure, I down-rev'd the device firmware several releases, and the error still persists. I also did a comparison of the data dump output, and it is identical between old and firmwares. So, I doubt that the device itself is part of the problem. This leaves the PC & OS as my best guess, but I really don't want to go on a wild goose chase trying to find out what piece of Windows software (if any) is responsible.

I re-installed the VB6 run-time package, but that didn't help. The guy says he's never installed any run-time updates either.

Any thoughts?