Click here to Skip to main content
15,921,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.

C#
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();
                   }
               }
           }
Posted

1 solution

You can see this links

Click

Click
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900