Difference between revisions of "ADO Tools"

From AutoIt Wiki
Jump to navigation Jump to search
Line 23: Line 23:
  
 
[[File:ADO OLE DB Providers.jpg||OLE DB Providers]]
 
[[File:ADO OLE DB Providers.jpg||OLE DB Providers]]
 +
 +
[[Category:ADO]]

Revision as of 10:32, 9 January 2014

List all installed OLE DB providers

#include <Array.au3>
Global $sOutput, $oRegistry, $oKey, $sKey = "HKCR\CLSID", $iIndexReg = 1, $iIndexResult = 0
Global $aResult[200][3]
While 1
    $sSubKey = RegEnumKey($sKey, $iIndexReg)
    If @error Then ExitLoop
    $sKeyValue = RegRead($sKey & "\" & $sSubKey, "OLEDB_SERVICES")
    If @error = 0 Then
        $aResult[$iIndexResult][0] = $sKey & "\" & $sSubKey
        $aResult[$iIndexResult][1] = RegRead($sKey & "\" & $sSubKey, "")
        $aResult[$iIndexResult][2] = RegRead($sKey & "\" & $sSubKey & "\OLE DB Provider", "")
        $iIndexResult = $iIndexResult + 1
    EndIf
    $iIndexReg = $iIndexReg + 1
WEnd
ReDim $aResult[$iIndexResult][3]
_ArrayDisplay($aResult, "OLE DB Providers", "", 0, Default, "Registry key|OLE DB Provider|Description")

Result:

OLE DB Providers