0

Does anyone know if its possible to read ascii the files that Btrieve Maintenance Utility creates during its recover process using C#

We create sequence files using the following command on windows

for %%f in (*.xq?) DO BUTIL -recover %%f %%f.seq

I know these files are Ascii files but when i open them in notepad++ it's almost impossible to make something of it

If i look at the documentation of it,i can't figure out how i need to read these files using C#

Jordy van Eijk
  • 2,718
  • 2
  • 19
  • 37
  • Try using Load : The RECOVER command extracts data from a MicroKernel file and places it in an ASCII file that has the same format as the input ASCII file that the Load command uses. This is often useful for extracting some or all of the data from a damaged MicroKernel file. The RECOVER command may be able to retrieve many, if not all, of the file’s records. You can then use the LOAD command to insert the recovered records into a new, undamaged MicroKernel file. – jdweng Mar 19 '18 at 16:56

1 Answers1

0

Those aren't regular ASCII files. They are byte images of the record. For strings, they come through as ASCII but numbers don't come through as human readable text. You would have to parse the individual bytes within each line and would need record structure.
If you know the record structure, you might be able to parse the data into a structure but not every Btrieve data type is directly accessible through C#.
A better option is to use the Btrieve / PSQL client, read the actual data file, and extract it using a proper Btrieve / PSQL / Actian interface (like ODBC, OLEDB, Managed Provider, even the Btrieve API).

mirtheil
  • 8,952
  • 1
  • 30
  • 29