Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

GetMdacVersion - Retrieve the installed MDAC version

Total Hit ( 2853)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Click here to copy the following block
' 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 If

Function GetMdacVersion() As Version
  ' get the value of the FullInstallVer value under the HKLM\SOFTWARE\
  ' Microsoft\DataAccess key
  Dim regKey As Microsoft.Win32.RegistryKey = _
    Microsoft.Win32.Registry.LocalMachine.OpenSubKey( _
    "SOFTWARE\Microsoft\DataAccess")
  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


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.