简体   繁体   English

使用C#将Btrieve顺序文件转换/读取为人类可读的文本

[英]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# 谁知道Btrieve Maintenance Utility在使用C#恢复过程中创建的文件是否可以读取ascii

We create sequence files using the following command on windows 我们在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 我知道这些文件是Ascii文件,但是当我在记事本++中打开它们时,几乎不可能做得到

If i look at the documentation of it,i can't figure out how i need to read these files using C# 如果我看一下它的文档 ,我不知道我该如何使用C#读取这些文件。

Those aren't regular ASCII files. 这些不是常规的ASCII文件。 They are byte images of the record. 它们是记录的字节图像。 For strings, they come through as ASCII but numbers don't come through as human readable text. 对于字符串,它们以ASCII形式出现,但数字不是以人类可读的文本形式出现。 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#. 如果您知道记录结构,则可以将数据解析为结构,但并非每种Btrieve数据类型都可以通过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). 更好的选择是使用Btrieve / PSQL客户端,读取实际的数据文件,然后使用适当的Btrieve / PSQL / Actian接口(例如ODBC,OLEDB,托管提供程序,甚至是Btrieve API)将其提取。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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