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 driver is missing. The error that's returned from ADO isn't always that user-friendly.
There are probably a nice little function that returns all installed drivers but I haven't found it.
The header and library files for OLE DB Driver for SQL Server (msoledbsql. h and msoledbsql. lib/msoledbsql19. lib) are installed in %PROGRAMFILES%\Microsoft SQL Server\Client SDK\OLEDB\<major_version><minor_version>\SDK .
Navigate to Start, and enter C:\Windows\System32\odbcad32.exe into the Search programs and files field. When the ODBC Administrator opens, click the Drivers tab and look for Microsoft Excel Driver or Microsoft Access Driver. If these drivers are present, this confirms the existence of 64-bit ACE components.
In Administative Tools, double-click Data Sources (ODBC). Click the Drivers tab. Information for the Microsoft SQL Server entry is displayed in the Version column.
OLE DB Driver for SQL Server was designed to provide a simplified method of gaining native data access to SQL Server using OLE DB. It provides a way to innovate and evolve new data access features without changing the current Windows DAC components, which are now part of the Microsoft Windows platform.
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;';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With