473,473 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

mose Mbugua
17 New Member
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 2297
twinnyfo
3,653 Recognized Expert Moderator Specialist
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
mose Mbugua
17 New Member
Twinnyfo,
i will appreciate that alot.
Sep 30 '14 #3
twinnyfo
3,653 Recognized Expert Moderator Specialist
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 Recognized Expert Top Contributor
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 Recognized Expert Moderator Specialist
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 Recognized Expert Top Contributor
That is an incredible idea. I think I'll work on that today. =)
Thanks again!
Oct 3 '14 #7
twinnyfo
3,653 Recognized Expert Moderator Specialist
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 Recognized Expert Top Contributor
Thank you. I stole your code. =)
Oct 3 '14 #9
twinnyfo
3,653 Recognized Expert Moderator Specialist
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.