devxlogo

GetMdacVersion – Retrieve the installed MDAC version

GetMdacVersion – Retrieve the installed MDAC version

' Retrieve the installed MDAC version'' Examples:'   Dim ver As Version = GetMdacVersion()'   ' print the full version'   MessageBox.Show(ver.ToString())'   ' print the major and minor portions'   MessageBox.Show("Major: " & ver.Major & ", Minor: " & ver.Minor)'   ' check whether the current version is at least 2.7'   If ver.CompareTo(New Version(2, 7, 0, 0)) < 0 Then'      MessageBox.Show("MDAC version 2.7 or above is required!")'   End IfFunction GetMdacVersion() As Version    ' get the value of the FullInstallVer value under the HKLMSOFTWARE    ' MicrosoftDataAccess key    Dim regKey As Microsoft.Win32.RegistryKey = _        Microsoft.Win32.Registry.LocalMachine.OpenSubKey( _        "SOFTWAREMicrosoftDataAccess")    Dim ver As String = CType(regKey.GetValue("FullInstallVer", "0.0.0.0"), _        String)    regKey.Close()    ' split the string in tokens and build a Version object    Dim verTokens() As String = ver.Split("."c)    Return New Version( Integer.Parse(verTokens(0)), Integer.Parse(verTokens(1)) _        , Integer.Parse(verTokens(2)), Integer.Parse(verTokens(3)))End Function

See also  5 Ways to Improve Customer Experience
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist