|
-
Jan 24th, 2006, 02:49 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Opening data from various Access Databases
I was wondering if anyone knew how to check to see if a database is 97,2000,2002, or 2003? I need to be able for my data to be accessible to all those types of databases. If anyone can help I would be greatly appreciative.
Nenio foriras ĝis ĝi havas instru ni kiu ni devas scii.
-
Jan 24th, 2006, 04:40 PM
#2
Re: Opening data from various Access Databases
Use "application.version"
11 = Access 2003
10 = Access 2002
9 = 2000
8 = 97
etc...
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Jan 25th, 2006, 07:43 AM
#3
Thread Starter
Addicted Member
Re: Opening data from various Access Databases
ok, so how could you check for that?
If (application.version = 11)then
msgbox("Access 2003")
End If
-
Jan 25th, 2006, 07:55 AM
#4
Re: Opening data from various Access Databases
That will work inside an Access application. How/where are you trying to run it? (are you using VB6? ADODB? ...).
Under what circumstances can you not open a database?
-
Jan 25th, 2006, 08:25 AM
#5
Re: Opening data from various Access Databases
I knew I had a snippet of how to check the version from VB in my Code Library somewhere, and I found it.
It is for DAO however, but shouldn't pose to big a problem in converting.
VB Code:
'Set A Reference To MS Access Object Library
'Set A Reference to MS DAO 3.6 or later
Private Sub Command1_Click()
Dim Axs As Access.Application
Set Axs = New Access.Application
Axs.OpenCurrentDatabase ("c:\codelib\codelibrary.mdb"), False
MsgBox Axs.CurrentDb.Version
End Sub
Once you have retrieved the version, see DKenny post for its translation.
-
Jan 25th, 2006, 09:04 AM
#6
Thread Starter
Addicted Member
Re: Opening data from various Access Databases
I'm using VB6 in interface with an Access database, the program is ran on multiple computers and the database is being opened by different Access databases (2003,2002,200,97). SO I need to keep the original database on the network drive from being corrupt or changed to an older database.
-
Jan 25th, 2006, 09:08 AM
#7
Re: Opening data from various Access Databases
I'm using VB6 in interface with an Access database,
What connection method? (DAO/DAO Data Control/ADO DB/ADO DataControl/DataEnvironment/.....?)
Why is the database version being changed?
-
Jan 25th, 2006, 09:16 AM
#8
Thread Starter
Addicted Member
Re: Opening data from various Access Databases
ADO DB, I believe the database is being changed due to people going into the database its self. I if were to put a lock on the database would VB6 still be able to connect to it?
-
Jan 25th, 2006, 09:18 AM
#9
Re: Opening data from various Access Databases
 Originally Posted by manofsteel00
ADO DB, I believe the database is being changed due to people going into the database its self. I if were to put a lock on the database would VB6 still be able to connect to it?
This isn't going to change the version of the database. An Access 2000 database is going to remain an Access 2000 database regardless of how many records are being added.
Someone would have to open the database with Access 2003, and explicitly convert it before it would become an Access 2003 database. It is not something you could do accidentaly.
-
Jan 25th, 2006, 09:44 AM
#10
Re: Opening data from various Access Databases
Yep.
If you put a password on the database then people wont be able to open it, but you can via your program (you just need to alter the connection string, see link below).
-
Jan 25th, 2006, 10:15 AM
#11
Thread Starter
Addicted Member
Re: Opening data from various Access Databases
Nenio foriras ĝis ĝi havas instru ni kiu ni devas scii.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|