Board index » delphi » List of registred DBases

List of registred DBases

Ok, I have Delphi 3 form and one Combo box.
How I can see all registred DataBases in Combo Box.

Please send me source if possible.

Send answers to naruci...@usa.net

Thank you!

 

Re:List of registred DBases


In article <6l6lvr$...@as041.tel.hr>,
  "James Bond" <naruci...@usa.net> wrote:

Quote

> Ok, I have Delphi 3 form and one Combo box.
> How I can see all registred DataBases in Combo Box.

> Please send me source if possible.

> Send answers to naruci...@usa.net

If you mean a list of all BDE Aliases,  then use:

Session.GetDatabaseNames(combobox1.items);

            Jeff

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

Re:List of registred DBases


James Bond schrieb in Nachricht <6l6lvr$...@as041.tel.hr>...
|Ok, I have Delphi 3 form and one Combo box.
|How I can see all registred DataBases in Combo Box.
|
|Please send me source if possible.
|
|Send answers to naruci...@usa.net
|
|Thank you!
|

Hi Mr.Bond !!

To get all defined aliases you can use the method TSession.GetAliasNames().
Here is a procedure that fills a TListBox (in the example : LBX_Aliases)
with all aliases that are defines in the system. Then it writes the first
alias into an edit-field.
Because a Combo-Box also uses TStrings to hold its items, you can exchange
the TListBox with aTComboBox to diaplay tha aliases.

procedure TFRM_Main.FormCreate(Sender: TObject);
begin
  Session.GetAliasNames(LBX_Aliases.Items);
  EDT_AliasDriver.Text := Session.GetAliasDriverName(LBX_Aliases.Items[0]);
end;

Hope that helps ...
                               Ralf

--
----------------------------------------------------------------------------
---------
Antworten bitte an / please answer to :
RALF-KAI...@EUROBRIEF.DE    oder / or
RKAISER....@METRONET.DE
----------------------------------------------------------------------------
---------

Other Threads