Is it possible to get the version of jet an access file requires? I have been looking at File and File attributes under System.IO, and I was trying to see if it was possible with OleDb, but I couldn't find a way to direct it to a file, without setting the connection string.
Is it possible to get the version of jet an access file requires? I have been looking at File and File attributes under System.IO, and I was trying to see if it was possible with OleDb, but I couldn't find a way to direct it to a file, without setting the connection string.
it MIGHT be possible if you open the mdb file and read in the file header info.
Here is a screenshot when looking at an access 2003 (jet 4.0) mdb file in a hex editor. Note it clearly states 4.0 and I am assuming that value is supposed to be the JET version. I don't have a 3.51 MDB file to test against.
However I think using JET 4.0 in your connection string should work for opening 3.51 version MDB files no?
When I was googling last night, I found that the file header could be read as you suggested, Kleinma, but I didn't know if that could be done in Visual Basic 2005.
Basically, what I am trying to accomplish is to make kind of a smart program that the user can select a database file and the program will identify the type of database it is (within a predefined amount of types) and use the correct connection string to open it.
I was looking at connectionstrings.com, and saw that access 2007 uses a different type of connection string that previous versions of access, so that is what started my need to make the program "smarter".
Can the file header be read using visual basic 2005? If not, is there another way to do this. I am expecting my users to not be smart enough to know what type of access database they have.
With VB you can open the file and read in the bytes and interpret the data yourself via code, but there is no function thats is going to make it a quick few lines of code to accomplish that.
However like I mentioned above, get your hands on an Access 97 MDB file, and see if a JET 4.0 Connection String will open it just fine. I have a feeling it might. You couldn't open a JET 4.0 DB with a 3.51 connection string, but JET 4.0 might offer backwards compatibility with older MDB files.
Re: [RESOLVED] [2005] Get Access Jet version question
They changed it because all the Office file formats have changed to XML-based. MDB is a binary file but I think that ACCDB is the new XML-based format.
It's always a good idea to give some background on your question. If you'd said in the first place that you wanted to connect to an Access 2007 database then we could have helped with that specifically.