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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking versions of a mde file

Status
Not open for further replies.

joebickley

Programmer
Aug 28, 2001
139
GB
Hi

I issue several copies of an MDE file to my users that connect to a SQL server for their data. Whenever i make a change to the database and have a new mde file to pass out i have to chase people to do it which is a pain.

If i go into database properties on the file menu i can add a version number to it. What i want to do is compare thsi to a text file or something.

Does anyone know how i might be able to get this version number using vba?

Thanks
Joe
 
Ok to update i got this so far

Function CheckImCurrent() As Boolean
Dim dbs As Database
Dim cnt As Container
Dim doc As Document
Dim myCurrentVersion As Integer
Set dbs = CurrentDb
Set cnt = dbs.Containers!Databases
Set doc = cnt.Documents!UserDefined
myCurrentVersion = doc.Properties("myversion")
End Function


it returns the info fine but i have to have the MS DAO 3.6 referance library turned on and i dont really want to do that and im sure there is an updated way of doing this.

Any ideas?
 
Joe,

Are you looking for a simpler way to distribute your application? If so, check out the deploying databases article on my website. It details how to use a batch file to get new versions of a database to users without ever having to touch the desktop.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Thanks Jeremy, i was trawling though the forums and i think i have found something similar. Will look at ur web site when i get home cos my works firewall wont find it!!

Thank again
 
I don't think it's a firewall issue 'cause I just went to visit Jeremy's site and couldn't get in either. I've been there before so maybe they're just having a spot of trouble right now. Ann
 
Hmm. Sorry about that. I just sent a really polite ([evil]) note to my domain host about this.

For now, here's a really simple batch file that I use for one of my clients. This database is for a family-run business, so it's the first one I've ever developed for a client that doesn't use security, and there are no dlls to register. But if they were to put a new computer on the network, all they would have to do is send that person this batch file--double clicking on the batch file installs anything that needs to be installed and fires up a local copy of the database.

Jeremy

rem make the directories (no harm if they're already there)
c:
cdcd "Program Files"
mkdir "NRP Database"
cd "NRP Database"

rem If the latest version file is on the PC, just start the database
if exist "NRP_FEVersion.1.72.txt" goto Startup

rem copy the images and shortcuts
copy "\\Nrp\C\NRP System\NRP_FE.bmp"
copy "\\Nrp\C\NRP System\ReportFooter.bmp"
copy "\\Nrp\C\NRP System\ReportHeader.bmp"
copy "\\Nrp\C\NRP System\NRP Database.lnk"
copy "NRP Database.lnk" "C:\Documents and Settings\All Users\Start Menu\NRP Database.lnk"
copy "NRP Database.lnk" "C:\Documents and Settings\All Users\Desktop\NRP Database.lnk"

rem copy ABCD Library
copy "\\Nrp\C\NRP System\ABCDLibraryXP.mde"

rem Copy a new front end
copy "\\Nrp\C\NRP System\NRP_FE.mdb"
copy "\\Nrp\C\NRP System\NRP_FEVersion.1.72.txt"

:Startup
rem fire it up
"C:\Program Files\Microsoft Office\Office10\msaccess.exe" "c:\Program Files\NRP Database\NRP_FE.mdb"
==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Well, the website is down for a while, but I've moved everything to another one of my domains, so if you're interested, you can find it at the URL below.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top