VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ODBC Driver installed in your computer

by Murali Bala (7 Submissions)
Category: Registry
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 29th June 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

ODBC Driver installed in your computer

API Declarations


'An ActiveX Server for Manipulation of the Registry
'http://msdn.microsoft.com/vbasic/downloads/addins/default.asp

Rate ODBC Driver installed in your computer





Private Sub Form_Load()

 
 Dim key As RegKey
 Dim val As RegValue
    Set key = RegKeyFromString("\HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers")
    For Each val In key.Values
        Combo1.AddItem val.Name
    Next
    GetRegValueInSoftware
End Sub

Private Sub GetRegValueInSoftware()
 Dim key1 As RegKey
 Dim i As Integer
 Dim ic As Integer
    
'Get the all Subkeys in the HKEY_LOCAL_MACHINE\SOFTWARE section
'You can further drill down the hierarchy.
    
    Set key1 = RegKeyFromHKey(-2147483646)
    For i = 1 To key1.SubKeys.Count
        If key1.SubKeys(i).Name = "SOFTWARE" Then
            For ic = 1 To key1.SubKeys(i).SubKeys.Count
                List1.AddItem key1.SubKeys(i).SubKeys(ic).Name
            Next
        End If
    Next

End Sub

Download this snippet    Add to My Saved Code

ODBC Driver installed in your computer Comments

No comments have been posted about ODBC Driver installed in your computer. Why not be the first to post a comment about ODBC Driver installed in your computer.

Post your comment

Subject:
Message:
0/1000 characters