Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I tell which version of Access an mdb file is?

36 views
Skip to first unread message

Mike

unread,
May 13, 1999, 3:00:00 AM5/13/99
to
I need to write an install script that will include updating an existing mdb
as part of a larger project. This mdb can be either Access 2, 7 or 8. I have
multiple update mdb's but need to determine which to run at install time
(i.e., am I updating an access 2 db to access 8, access 7 to access 8, or is
it already access 8) because different updates need to be made depending on
which version they had previously (columns added to tables, etc.). I am
trying to automate this so I don't have to prompt the installee to resolve
this. Obviously this capability exists in Access because when you are
already in Access and you attempt to open an older version db Access will
prompt you as to whether or not you want to convert it. How does Access know
the version of the mdb it is trying to open? Is this file registered or
something in the registry? As far as I know there is only one file type for
mdb files? Can anyone shed some light on this issue for me?

Dev Ashish

unread,
May 13, 1999, 3:00:00 AM5/13/99
to
Hi Mike,

Access has an undoc'd (and thus unsupported) property called AccessVersion
on all mdbs. This is what you need to check. I don't remember the exact
values for each version, this code verifies if the mdb is an Access 97 one.

'******* Code Start *******
Function fIs97MDB(strRemoteDB As String) As Boolean
Dim lowrk As DAO.Workspace
Dim lodb As DAO.Database
On Error GoTo Err_handler

Set lowrk = CreateWorkspace("DownsizerWorkSpace", "Admin", "", dbUseJet)
Set lodb = lowrk.OpenDatabase(strRemoteDB)
With lodb
fIs97MDB = (.Properties("AccessVersion") > "07.00")
End With
Exit_Here:
lodb.Close
Set lodb = Nothing
lowrk.Close
Set lowrk = Nothing
DoEvents
Exit Function
Err_handler:
fIs97MDB = False
Resume Exit_Here
End Function
'******* Code End *******

HTH
--
Dev Ashish (Just my $.001)
---------------
The Access Web ( http://home.att.net/~dashish )
---------------


Mike <olsz...@fs.com> wrote in message news:7hekj6$934$1...@news.mr.net...
: I need to write an install script that will include updating an existing

:
:


0 new messages