How can I make sure that a certain OLEDB driver is installed when I start my application? I use ADO from Delphi and would like to display a descriptive error message if the
This is an old question but I had the same problem now and maybe this can help others.
In Delphi 7 there is an procedure in ADODB that return a TStringList with the provider names.
Usage example:
names := TStringList.Create;
ADODB.GetProviderNames(names);
if names.IndexOf('SQLNCLI10')<>-1 then
st := 'Provider=SQLNCLI10;'
else if names.IndexOf('SQLNCLI')<>-1 then
st := 'Provider=SQLNCLI;'
else if names.IndexOf('SQLOLEDB')<>-1 then
st := 'Provider=SQLOLEDB;';