Solved

Getting a list of BDE Aliases?

Posted on 1998-07-28
3
345 Views
Last Modified: 2010-04-03
Any BDE calls or sample code to get a list of all BDE aliases?  
Does the BDE automatically give the ODBC aliases also?  Or is that a seperate call?
(I have to get a list of both).

Thanks,
j
0
Comment
Question by:greendot
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 100 total points
ID: 1358799
Hi greendot,

look at the BDE help file :

Delphi Examples: DbiOpenDatabaseList

Return a list of of accessible databases and all aliases found in the configuration file.

This example uses the following input:
      fDbiOpenDatabaseList(DatabaseList);

procedure fDbiOpenDatabaseList(DatabaseList: TStringList);
var
  TmpCursor: hDbiCur;
  Database: DBDesc;
  rslt: DbiResult;
begin
  DatabaseList.Clear;
  Check(DbiOpenDatabaseList(TmpCursor));
  repeat
    rslt:= DbiGetNextRecord(TmpCursor, dbiNOLOCK, @Database, nil);
    if (rslt <> DBIERR_EOF) then
    begin
      DatabaseList.Add(StrPas(Database.szName)
        + ' - ' + StrPas(Database.szPhyName)
        +  ' - ' + StrPas(Database.szDbType))
    end;
  until rslt <> DBIERR_NONE;

  Check(DbiCloseCursor(TmpCursor));
end;




0
 
LVL 2

Author Comment

by:greendot
ID: 1358800
Zif,

thanks for pointing me into the right direction...

your answer was straight from the help file.  :)
But from in there, I found out that TSession has a GetAliasNames routine built in.
Which worked like a champ.

-g
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1358801
yes, forgot about the TSession component.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi : could not find program, '...exe' 2 212
How to make Sign in, using Clientdataset? 1 33
DBCtrlGrid, Delphi, Scroll 7 32
firemonkey Android Listview Sort items 7 70
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question