For example, you need to check whether the user has JET 4.0 or ACE 12.0 in the system.
1 answer
Generally, these are OLE DB providers and their search is performed using OleDbEnumerator .
using System.Data.OleDb; . . . OleDbEnumerator enumerator = new OleDbEnumerator(); DataRow[] foundRows = enumerator.GetElements().Select("SOURCES_DESCRIPTION = 'описание провайдера'"); if (foundRows.Length > 0) { /*OLE DB провайдер установлен! Всё в порядке!*/ } else { /*OLE DB провайдер не установлен!*/ } Alternatively, you can search by system name:
DataRow[] foundRows = enumerator.GetElements().Select("SOURCES_NAME = 'имя провайдера'"); Only here descriptions and system names of providers for Access, I can not tell you right away.
|