Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detmine Access MDB version 2

Status
Not open for further replies.

Kieran777

Programmer
Apr 23, 2003
26
0
0
AU
Has anyone got any VB .NET code to read an Access MDB file and determine what the version of the MDB is. i.e., Access 97, Access 2000, Access XP, Access 2003 or Access 2007.

regards
Kieran
 
You may test the Version property of the Database object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I think that to find .Net code to determine which version the mdb is created with, you need to visit fora dedicated to that technology.

However, if you, through either COM or Interop, get a hold on the Access application object, you can use the .FileFormat property of the .CurrentProject object.

The 2007 file format, will be either ACCDB or ACCDE, so that would be easier to determine :)

Here's something that might get you started, if you need to determine version prior to opening the file (Classic VB)
Roy-Vidar
 
Thank you PVH (MIS), but can you give me just some example code in vb.NET. Thanks in advance

 
I am looking for some sample code to achieve the finding of an access MDB files version. I don't want to get the version of the Access version running I need to open the Access MDB file and establish what version the MDB file is.
The sample code would need to be any version of VB.NET.

I can create a connection string and open any Access MDB file but I cannot find a property that gives me the version of the Access MDB file (or MDE or MDW) for that matter.

Maybe it has to be opened in binary format and sequentially read to get the version (if so has anyone got any VB.NET code to do such).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top