从BDE检索数据库名称 [英] Retrieve DataBase Names from BDE
问题描述
大家好,我想知道是否有人可以帮助我,我需要使用C#(Windows)从BDE检索数据库别名,到目前为止,我所做的就是设法读取下面的文件路径(从二进制到字符串并显示)它在我的控制台应用程序上(从这里我可以看到存储在BDE上的所有别名),但是我不知道下一步该怎么做.
我现在的问题是,有没有一种方法可以查看表Format(EG.DataTable)中的BinaryData?
还是以一种方式可以遍历Binary Reader文本,以便能够检索数据库别名名称及其对应的文件路径?
如果对此有其他解决方法,请分享,因为我现在很困惑.到目前为止,这是我的代码,在此先感谢.
hi all,I was wondering if someone could help me, i need to retrieve DataBase aliases from BDE using C#(Windows), what ive done is so far is to manage to read the file path below from Binary to string and display it on my console application(From here i can see all the aliases stored on the BDE),however i cant figure out what to do next.
My question now is,is there a way to view the BinaryData in a table Format(EG. DataTable) ?
or perhaps a way in which i can loop through the Binary Reader text so that i am able to retrieve the DataBase aliase name and its corresponding filepath?
if there is a different approach to this please share as i am stumped for now.Beneath is my code thus far,thanks in advance.
string strFileName = @"E:\Program Files\Common Files\Borland Shared\BDE\IDAPI32.CFG";
using (FileStream myFstr = new FileStream(strFileName, FileMode.Open))
{
using (StreamReader myStrRdr = new StreamReader(myFstr))
{
Console.WriteLine(myStrRdr.ReadLine());
Console.WriteLine();
myFstr.Position = 0;
using (BinaryReader myBrdr = new BinaryReader(myFstr))
{
string strstring = myBrdr.ReadString();
Console.WriteLine(strstring);
Console.ReadKey();
}
}
}
推荐答案
您可以看到此链接
单击
点击
You can see this links
Click
Click
这篇关于从BDE检索数据库名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!