Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Feb 2002
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Determine whether Converted or Enabled (A2K)

    I would like to know the most simple way to determine whether a database has been Enabled or Converted to Access 2000, preferably without having to open it.

    Anyone know if such a thing?

    Thanks,

    Randy

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Determine whether Converted or Enabled (A2K)

    What are you trying to accomplish? You'll get better answers if you provide enough information.
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Feb 2002
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determine whether Converted or Enabled (A2K)

    Ok, I have several sites that have installed Access 2000. The users are not very PC friendly. Each site has many databases that have either been enabled in, or converted to Access 2000. I need to find out what the 'state' is of each database.

    I suppose that they could try to create a new query, form, etc. and see if it let's them, but that wouldn't be conclusive evidence that it's an enabled database since someone may have given them a database that prohibits that. But especially, I emphasize that they are not PC friendly; walking them through this for each database will be very time consuming.

    I thought that their might be a way to tell programatically whether a database is enabled or converted. I thought of creating a module with the test and either having them import it to each database (I could have them select the database and export it from my utility), or perhaps perform the test directly from my test database.

    I can't find out if there even is such a property/test that I can use.

    Thanks for your help.

    Randy

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determine whether Converted or Enabled (A2K)

    This function will return Enabled or converted for the given mdb (with path)
    Set the reference to Microsoft DAO 3.6 Object Library
    Use it as TestVersion("c:My DocumentsMyDatabase.mdb")
    <pre>Function TestVersion(strFile As String) As String
    Dim wrkJet As Workspace
    Dim db As DAO.Database
    Set wrkJet = CreateWorkspace("", "admin", "")
    Set db = wrkJet.OpenDatabase(strFile)
    Select Case db.Properties("version")
    Case "3.0"
    TestVersion = "Enabeld"
    Case "4.0"
    TestVersion = "Converted"
    Case Else
    TestVersion = "Unknow"
    End Select
    Set db = Nothing
    Set wrkJet = Nothing
    End Function
    </pre>

    Francois

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Determine whether Converted or Enabled (A2K)

    That doesn't appear to be totally reliable, Francois. I tried it on a 97 database which is definitely not converted or enabled and got an Enabled result. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determine whether Converted or Enabled (A2K)

    You're probably right. I tested it only on enabled and converted databese.
    But it give the version of the jet. Maybe that's what Randy need.
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •