Hi Guys?. When using a program for example an Antivirus, there comes a time when it "tells" you that there is a newer version available. You then decide either to update it or not. Now my question is if that applies to access databases. Lets say after releasing a version of a database, say version 1.0, you then continue adding new features and debugging it. So you call the newer version 1.1. When you want those changes to appear in previous version (1.0), do you have to import the changes or is there another way that you can feed those new features in the previous database versions?
9 2294
Mose,
I always have the newest FE on the network. Whenever anyone wants to use the db, I use a command script which copies that front end to the user's local machine. This means that every time I make updates, they are automatically published.
I'm not sure why you would import new features into an old db, or why you would, as a new FE is a new FE.
I'd be glad to share my script if you are interested, but I have it at work and am at home right now.
Twinnyfo,
i will appreciate that alot.
Open Notepad.
Add this text: - @ECHO OFF
-
IF NOT EXIST %userprofile%\Documents\DBUser\[Your DB Name].accde MKDIR %userprofile%\Documents\DBUser
-
COPY [\\Network Location\NetworkFolder\Database Folder\[Your DB Name].accde %userprofile%\Documents\DBUser\[Your DB Name].accde /Y
-
START /I "MSAccess.exe" %userprofile%\Documents\DBUser\[Your DB Name].accde
Save this file with the ".cmd" extension. Save it in your network location. Any shortcuts to the DB, should actually point to this file.
This file will copy the shared FE from the Network, down to the User's machine, then open it from there.
This makes sure every time a user opens the DB, it is the latest version.
Coincidently, I was about to create a deployment script when this post showed up. Gotta love it when the code you need finds you. Thanks Twinnyfo!
I took your approach and took it a step further. We have multiple locations across the Midwest, but I want to deploy from one location. Copying the file every time the application is launched could cause some frustration when it's being copied between locations 400 miles apart. So, I added a version .txt file allowing the file copy only to take place if there is a new version.
Since I borrowed the code in the first place, I thought I would give back. - @ECHO OFF
-
CLS
-
SET gSourceLocation=\\tserver\Applications\MHSC\
-
SET gAppFileName=MHSC.accde
-
SET gVersionFileName=MHSC.txt
-
SET gAppDir=Documents\Applications\
-
-
SET sUserProfile=%userprofile%
-
SET sSourceFile=%gSourceLocation%%gAppFileName%
-
SET sSourceVersionFile=%gSourceLocation%%gVersionFileName%
-
-
SET sDestination=%sUserProfile%\%gAppDir%
-
SET sDestinationFile=%sDestination%%gAppFileName%
-
SET sDestinationVersionFile=%sDestination%%gVersionFileName%
-
-
SET sSourceVersion=0
-
SET sDestinationVersion=0
-
-
SET /p sSourceVersion=<%sSourceVersionFile%
-
SET /p sDestinationVersion=<%sDestinationVersionFile%
-
IF "%sDestinationVersion%"=="" (SET sDestinationVersion=0)
-
-
ECHO ........................................
-
ECHO Source Version File: %sSourceVersionFile%
-
ECHO Current Version File: %sDestinationVersionFile%
-
ECHO ........................................
-
ECHO Application: %sSourceFile%
-
ECHO Local Directory: %sDestination%
-
ECHO Current Version: %sDestinationVersion%
-
ECHO Availiable Version: %sSourceVersion%
-
ECHO ........................................
-
-
IF NOT EXIST %sDestination% (
-
ECHO Making Destination Directory...
-
MKDIR %sDestination%
-
)
-
-
IF %sDestinationVersion% LSS %sSourceVersion% (
-
ECHO Installing latest version of the Application to this computer
-
ECHO Please be patient, this should take no more than 30 Seconds...
-
COPY %sSourceFile% %sDestination%
-
ECHO Copying Version File to Local Computer...
-
COPY %sSourceVersionFile% %sDestination%
-
)
-
-
START "MSAccess.exe" %sDestinationFile%
-
To use this, update the four "constants" at the top to reflect your environment. Then create a text file (mine is called MHSC.txt) and put a version number in it.
Then give your users a link to it. Finally, when you have a new version of the code available, Increment the number in the .txt file
J,
Great script! I like it. I admit I know very little about Command Scripting, hence the very basic nature of my version.
I think I may also add some code to my FE, such that when I compile and relink all my tables (which I do programatically), it will automatiaclly update the version text file. Then I woun't forget.....
Thanks again!
That is an incredible idea. I think I'll work on that today. =)
Thanks again!
Here is my go at it--I'm sure there are probably better ways to do it.... - Public Sub UpdateVersion()
-
On Error GoTo EH
-
Dim oFSO As FileSystemObject
-
Dim oTS As TextStream
-
Dim oTSTemp As TextStream
-
Dim strTemp As String
-
Dim strText As String
-
Dim intVersion As Integer
-
strTemp = gstrVersionFile & "tmp"
-
Set oFSO = New FileSystemObject
-
Set oTS = oFSO.OpenTextFile(gstrVersionFile)
-
strText = oTS.ReadLine
-
oTS.Close
-
Set oTS = Nothing
-
Set oTSTemp = oFSO.CreateTextFile(strTemp)
-
intVersion = CInt(strText)
-
intVersion = intVersion + 1
-
oTSTemp.WriteLine intVersion
-
oTSTemp.Close
-
set oTSTemp = Nothing
-
oFSO.DeleteFile gstrVersionFile, True
-
oFSO.MoveFile strTemp, gstrVersionFile
-
Set oFSO = Nothing
-
Exit Sub
-
EH:
-
MsgBox "There was an error updating the version text. " & _
-
"Please contact your Database Administrator.", vbCritical, "Error!"
-
Resume Next
-
End Sub
gstrVersionFile is a global variable with the path and file name.
Thank you. I stole your code. =)
Serves me right for stealing yours!
:-)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: MDGColorado |
last post by:
What is the strategy for working on an older version of a solution? We
labeled all the solution files in VSS a couple weeks ago. The Get on all the
files with the label seems to get all the right...
|
by: Todd Brown |
last post by:
I've got an application that I had worked on earlier this year that was
working fine for customers. Recently, I was asked to make some updates.
I didn't have VS installed anymore, so I...
|
by: Claudia Fong |
last post by:
Hello,
I'm having problems to open a project that I made in VS 2005 in my
laptop. I have an older version installed in my laptop (VS 2000 or 2002,
I'm not sure right now).
Is there a way so I...
|
by: Dick |
last post by:
Hello,
How can I develop for on older version of the windows mediaplayer.
I have version 9 installed, but my clients have version 7 installed.
There are differences in the object model:
for...
|
by: chppatel |
last post by:
does any one know where can I get older version of python for windows?
I am looking for versions between 2.0 and 2.2.
thanks for your help
|
by: Titan |
last post by:
When I run my project (F5), it runs an older version of my project.
However, when I build or rebuild the solution, it builds flawlessly...
so shouldn't this overwrite the older version of my...
|
by: Neil |
last post by:
A client of mine likes some of the new bells and whistles in Access 2007,
and is thinking about converting our A03 format MDB to an A07 format file.
However, while some of the users have A07, many...
|
by: Cirene |
last post by:
I create an ASP.NET web application using Visual Studio 2008. I created a
SQL Database thru here as well.
I copied the MDF over to the server, which is running SQL Server Enterprise
Manager (v...
|
by: surana |
last post by:
Find the latest updates in database management and SQL server tools
and techniques. More details about software testing, flowchart
preparation and many more
...
|
by: atlantianferret |
last post by:
Has anyone had any problems running the 2007 run-time with an older version still installed and able to use the older one also?
Thank you for any responses,
William J Moore
Information Systems...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |