?
Solved

list of odbc data sources

Posted on 2003-02-23
2
Medium Priority
?
242 Views
Last Modified: 2010-05-18
How do I get a list of current odbc data sources....
0
Comment
Question by:julianpointer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Expert Comment

by:ILE
ID: 8005441
meybe you cen do this
to get all aliases

1.session.Getaliasnames(listbox1.items);

2.after taht put one tdatabase component and assign first alias
3.conect with database
4 test wiht database.issqlbased
5. goto 3

is this satisfacted you?
0
 
LVL 17

Accepted Solution

by:
geobul earned 400 total points
ID: 8006594
Hi,

Put a ListBox and a Button on a form and try this (ODBC data sources only, not BDE Administrator databases):

uses registry;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ListBox1.Items.Clear;
  with TRegistry.Create do begin
    try
      if OpenKey('\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources', False) then begin
        GetValueNames(ListBox1.Items);
        CloseKey;
      end;
    finally
      Free;
    end;
  end;
end;

Regards, Geo
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

800 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