473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Feeding updates from a newer database version (1.1) to an older version (1.0)

mose Mbugua
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?
Sep 30 '14 #1
9 2294
twinnyfo
3,653 Expert Mod 2GB
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.
Sep 30 '14 #2
Twinnyfo,
i will appreciate that alot.
Sep 30 '14 #3
twinnyfo
3,653 Expert Mod 2GB
Open Notepad.

Add this text:

Expand|Select|Wrap|Line Numbers
  1. @ECHO OFF
  2. IF NOT EXIST %userprofile%\Documents\DBUser\[Your DB Name].accde MKDIR %userprofile%\Documents\DBUser
  3. COPY [\\Network Location\NetworkFolder\Database Folder\[Your DB Name].accde %userprofile%\Documents\DBUser\[Your DB Name].accde /Y
  4. 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.
Sep 30 '14 #4
jforbes
1,107 Expert 1GB
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.

Expand|Select|Wrap|Line Numbers
  1. @ECHO OFF
  2. CLS
  3. SET gSourceLocation=\\tserver\Applications\MHSC\
  4. SET gAppFileName=MHSC.accde
  5. SET gVersionFileName=MHSC.txt
  6. SET gAppDir=Documents\Applications\
  7.  
  8. SET sUserProfile=%userprofile%
  9. SET sSourceFile=%gSourceLocation%%gAppFileName%
  10. SET sSourceVersionFile=%gSourceLocation%%gVersionFileName%
  11.  
  12. SET sDestination=%sUserProfile%\%gAppDir%
  13. SET sDestinationFile=%sDestination%%gAppFileName%
  14. SET sDestinationVersionFile=%sDestination%%gVersionFileName%
  15.  
  16. SET sSourceVersion=0
  17. SET sDestinationVersion=0
  18.  
  19. SET /p sSourceVersion=<%sSourceVersionFile%
  20. SET /p sDestinationVersion=<%sDestinationVersionFile%
  21. IF "%sDestinationVersion%"=="" (SET sDestinationVersion=0)
  22.  
  23. ECHO ........................................
  24. ECHO Source Version File: %sSourceVersionFile%
  25. ECHO Current Version File: %sDestinationVersionFile%
  26. ECHO ........................................
  27. ECHO Application: %sSourceFile%
  28. ECHO Local Directory: %sDestination%
  29. ECHO Current Version: %sDestinationVersion%
  30. ECHO Availiable Version: %sSourceVersion%
  31. ECHO ........................................
  32.  
  33. IF NOT EXIST %sDestination% (
  34. ECHO Making Destination Directory...
  35. MKDIR %sDestination%
  36. )
  37.  
  38. IF  %sDestinationVersion% LSS %sSourceVersion% (
  39. ECHO Installing latest version of the Application to this computer
  40. ECHO Please be patient, this should take no more than 30 Seconds...
  41. COPY %sSourceFile% %sDestination%
  42. ECHO Copying Version File to Local Computer...
  43. COPY %sSourceVersionFile% %sDestination%
  44. )
  45.  
  46. START "MSAccess.exe" %sDestinationFile%
  47.  
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
Oct 2 '14 #5
twinnyfo
3,653 Expert Mod 2GB
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!
Oct 3 '14 #6
jforbes
1,107 Expert 1GB
That is an incredible idea. I think I'll work on that today. =)
Thanks again!
Oct 3 '14 #7
twinnyfo
3,653 Expert Mod 2GB
Here is my go at it--I'm sure there are probably better ways to do it....

Expand|Select|Wrap|Line Numbers
  1. Public Sub UpdateVersion()
  2. On Error GoTo EH
  3.     Dim oFSO As FileSystemObject
  4.     Dim oTS As TextStream
  5.     Dim oTSTemp As TextStream
  6.     Dim strTemp As String
  7.     Dim strText As String
  8.     Dim intVersion As Integer
  9.     strTemp = gstrVersionFile & "tmp"
  10.     Set oFSO = New FileSystemObject
  11.     Set oTS = oFSO.OpenTextFile(gstrVersionFile)
  12.     strText = oTS.ReadLine
  13.     oTS.Close
  14.     Set oTS = Nothing
  15.     Set oTSTemp = oFSO.CreateTextFile(strTemp)
  16.     intVersion = CInt(strText)
  17.     intVersion = intVersion + 1
  18.     oTSTemp.WriteLine intVersion
  19.     oTSTemp.Close
  20.     set oTSTemp = Nothing
  21.     oFSO.DeleteFile gstrVersionFile, True
  22.     oFSO.MoveFile strTemp, gstrVersionFile
  23.     Set oFSO = Nothing
  24.     Exit Sub
  25. EH:
  26.     MsgBox "There was an error updating the version text.  " & _
  27.         "Please contact your Database Administrator.", vbCritical, "Error!"
  28.     Resume Next
  29. End Sub
gstrVersionFile is a global variable with the path and file name.
Oct 3 '14 #8
jforbes
1,107 Expert 1GB
Thank you. I stole your code. =)
Oct 3 '14 #9
twinnyfo
3,653 Expert Mod 2GB
Serves me right for stealing yours!

:-)
Oct 3 '14 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
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...
0
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...
1
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...
0
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...
2
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
3
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...
17
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...
1
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...
0
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 ...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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...
0
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
0
BarryA
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...
1
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...
0
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...
0
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...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.