devxlogo

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

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Seven Service Boundary Mistakes That Create Technical Debt

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.