Solved

Getting a list of BDE Aliases?

Posted on 1998-07-28
3
343 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

789 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