简体   繁体   中英

Convert / Read Btrieve Sequential file to human readable text using C#

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#

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM