My problem. I have a legacy Turbo Pascal program, still running on MS DOS. The original source is lost, and I need to manipulate the information found inside the .DTA files.
I would really like to access this information from .Net, read and update. The first and obvious problem is that I don’t have the original data structure for the .DTA files.
It would be ideal to read the data auto-ordering it in columns, but I’m desperate enough to sit and try to set up the fields manually.
My MAIN ISSUE is that I don’t know how to read the data and write from within .Net.
I’ve tried:
using (BinaryReader b = new BinaryReader(File.Open(l_path, FileMode.Open), Encoding.UTF8))
and
OleDbConnection myConnection =
new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\;
Extended Properties=\"text;HDR=YES;FMT=FixedLength\"");
- I’m able to retrieve data; unfortunately only a single column with no delimiting. So, no structure.
- The presence of special characters (#, @ etc.). I also don’t know which Encoding should be used.
Can somebody please help me to read and write Pascal .DTA files from .net?
Thanks, Morne