TechTricks
Technical answers from the trenches 
 
 
 
 

     
   
Error: 'Start of DOS Errors'
 
   
by Lance Leonard 
 Posted: 21 July 2000
 
   
 
 Applies to: Paradox 9.0
 
       
   

Question: Help! My TextStream code is generating an error: "Start of DOS errors." What's causing this and how do I resolve it?

Answer: Currently, there are two known causes for this error:

Lengthy Filenames

The first cause relates to the size of the name of the file (and directory) of your target file. This message has been reported when the fully qualified filename is longer than ~58 characters.

To address this problem, reduce the length of the target file name/directory path. If you can't do this easily, consider writing the file to a temporary location and then copying it to the "real" location.

If that's not feasible, then you may be able to shorten the path by mapping network locations to a new drive letter or by using SUBST to create a logical drive pointing to the specific directory on a local drive.

Filenames containing spaces

The second cause appeared when writing text streams to files in C:\My Documents. This was inconsistent. It worked on one machine, but not others; however, we were able to work around the problem by referring to the file using the shortened version of its name. For example, instead of trying to create "C:\My Documents\output.txt", using "c:\mydocu~1\output.txt" worked.

Note: Don't forget that ObjectPAL requires two backslashes when assigning directory paths to variables. For example:

   strOutfile = "c:\\mydocu~1\\output.txt"

The error message itself is being reported by the file system supporting your operating system. Some environmental factor seems to be interfering with the code Paradox is using. Unfortunately, Windows is not very intelligent about obtaining this type of error, so there's little information available about the specific problem. (If you've run into other causes or have some additional information, we would love to hear it.)

 

       

Top

Feedback About Paradox Delphi Assorted Web Stuff
 
 
Copyright © 2000-2004, techtricks.com; All Rights Reserved.
Acknowledgements, Disclaimers, Terms and Conditions.
Article last updated on 31 May 2003

 

Other Sites: Paradox, Delphi, Perl, Web Stuff, and More


 

[- End -]