Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. MDAC Version

MDAC Version

Scheduled Pinned Locked Moved Visual Basic
helpquestionannouncementcareer
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sarah_chandran
    wrote on last edited by
    #1

    Hi, Can anyone please give me the code snippet in vb6 to check if MDAC is present on a machine and the MDAC version number if it is present. Right now i have a code that checks the ADO version. Here is the code: Option Explicit Function GetAdoVersion() As String 'Returns an empty string if ADO is not installed Dim o As Object On Error Resume Next Set o = CreateObject("ADODB.Connection") If Err.Number = 0 Then GetAdoVersion = o.Version Label1.Caption = "ADO Version = " & o.Version Else Label1.Caption = "ADO is not installed" End If End Function Private Sub Form_Load() Call GetAdoVersion End Sub Are ADO version and MDAC version the same always? Thanks in advance, Sarah -- modified at 6:12 Thursday 24th November, 2005

    D 1 Reply Last reply
    0
    • S sarah_chandran

      Hi, Can anyone please give me the code snippet in vb6 to check if MDAC is present on a machine and the MDAC version number if it is present. Right now i have a code that checks the ADO version. Here is the code: Option Explicit Function GetAdoVersion() As String 'Returns an empty string if ADO is not installed Dim o As Object On Error Resume Next Set o = CreateObject("ADODB.Connection") If Err.Number = 0 Then GetAdoVersion = o.Version Label1.Caption = "ADO Version = " & o.Version Else Label1.Caption = "ADO is not installed" End If End Function Private Sub Form_Load() Call GetAdoVersion End Sub Are ADO version and MDAC version the same always? Thanks in advance, Sarah -- modified at 6:12 Thursday 24th November, 2005

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      It's not that simple. No ADO and MDAC versions are NOT always the same. Various applications can install differing versions on their own, without installing the complete MDAC package. There is no reliable way to determine whcih version your using. Component Checker[^] will scan your machine to determine which version of MDAC your machine has installed, or the closest match. It'll show you what pieces are missing and what's installed, as well as the version information for each .DLL. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      S 1 Reply Last reply
      0
      • D Dave Kreskowiak

        It's not that simple. No ADO and MDAC versions are NOT always the same. Various applications can install differing versions on their own, without installing the complete MDAC package. There is no reliable way to determine whcih version your using. Component Checker[^] will scan your machine to determine which version of MDAC your machine has installed, or the closest match. It'll show you what pieces are missing and what's installed, as well as the version information for each .DLL. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        S Offline
        S Offline
        sarah_chandran
        wrote on last edited by
        #3

        Ok.Thanks for taking the time to reply.:) -- modified at 0:34 Saturday 26th November, 2005

        O 1 Reply Last reply
        0
        • S sarah_chandran

          Ok.Thanks for taking the time to reply.:) -- modified at 0:34 Saturday 26th November, 2005

          O Offline
          O Offline
          oakleaf
          wrote on last edited by
          #4

          More information can be found here: http://support.microsoft.com/default.aspx?scid=kb;en-us;301202[^] "Although not the most reliable way to check the MDAC version", I use a launch condition and install it if the version is below 2.7

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups