Board index » delphi » ODBC Driver List

ODBC Driver List

Hello

How do I retrieve a list of all the ODBC drivers found on a specific
system using the BDE or some other method that will simply assign the
list to a TStringList.

Thanking You
  Simon Murrell

 

Re:ODBC Driver List


On Mon, 17 Aug 1998 23:35:48 +0200, Simon Murrell <smurr...@goaldata.co.za>
wrote:

Quote
>Hello

>How do I retrieve a list of all the ODBC drivers found on a specific
>system using the BDE or some other method that will simply assign the
>list to a TStringList.

>Thanking You
>  Simon Murrell

procedure GetODBCInfo;
var
  myODBCRegistry:TRegistry;
   ODBCDrivers:TStringList;

begin
  try
    myODBCRegistry := TRegistry.Create;
    myODBCRegistry.RootKey := HKEY_LOCAL_MACHINE;
    if not (myODBCRegistry.OpenKey('SOFTWARE\ODBC\ODBCINST.INI\'
                                   'ODBC Drivers',false))  then
    begin

    end //else
    else
    begin

      myODBCRegistry.GetValueNames(ODBCDrivers);
    end; //else
  except
  else   // all other exceptions
  end; // except

  myODBCRegistry.Free;

end; //GetODBCInfo
Johann Fourie
email: johann.w.fou...@usa.net

Other Threads