473,320 Members | 1,910 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,320 software developers and data experts.

Multiple back ends, single front end

PhilOfWalton
1,430 Expert 1GB
I am dealing with a client who has about 10 branch offices in different location, each with about 10 computers in them.

Each branch has it's own BE database residing on the branch's server.
All branches & all computers have the same FE database which should obviously be an AccDE.

We are due to implement this in the not too distant future.

My concern is that as far as I can see, when a new version of the FE database gets issued, someone will have to go round 100 computers, install the new AccDb, re-link to the appropriate BE databases and then create an AccDE and remove the AccDb. Very time consuming and very prone to errors.

On way might be to hold a table of computer names and paths, but where should this stored?

Can anyone see a solution to this?

Phil
Aug 11 '16 #1
3 972
jforbes
1,107 Expert 1GB
These are a few options that I can think of:

(*) Microsoft has a technology called ClickOnce that might help you out here. It's pretty slick, but it's kind of got a steep learning curve. I haven't used it quite sometime. I think you can use either Visual Studio or the ClickOnce command line to create an Installer package that will install your application and manage your updates for you. In addition to the steep learning curve, you'll also need to get into creating and managing a Certificate to so that your antivirus and malware removals back off and let your application live in peace.


(*) An alternative installer/build method is WIX. This has another steep learning curve, but it makes a really nice Windows Installer using MSBuild. I think for this option, you will need to build something into the application to prompt your users to install the latest version (or do it for them) when a new version is available.

Both ClickOnce and Wix can be created without using Visual Studio, but it's probably easier with Visual Studio Community


(*) A somewhat simpler option is to build a Script that deploys your application updates for you and then Deploy the script to your users. This works in a similar fashion as ClickOnce, but with the entire process scripted by hand. It's simpler to understand and get going. This question discusses it a bit: Feeding updates from a newer database version (1.1) to an older version (1.0) and this is a related insight by Twinnyfo Working with Front and Back-Ends

We've been using a deployment script for 1 1/2 to 2 years now and it has been working great. We have multiple sites as well and this way the application is deployed to one site and the script installs the new copy on the local machine only when there is a new version available.

Here is a stripped down version of our current deployment Script, which is saved with a .cmd extension so that Windows knows it is a batch file:
Expand|Select|Wrap|Line Numbers
  1. @ECHO OFF
  2. CLS
  3. SET gSourceLocation=\\DeploymentServer\Applications\CoolProgram\
  4. SET gAppFileName=CoolProgram.accde
  5. SET gVersionFileName=CoolProgram.txt
  6. SET gAppDir=Documents\Applications\CP\
  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 Application: %sSourceFile%
  25. ECHO Local Directory: %sDestination%
  26. ECHO Source Version File: %sSourceVersionFile%
  27. ECHO Current Version File: %sDestinationVersionFile%
  28. ECHO ....................................
  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 the Local Computer
  40. ECHO Please be patient, this should take no more than a Minute...
  41. COPY %sSourceFile% %sDestination%
  42. ECHO Copying Version File to Local Computer...
  43. COPY %sSourceVersionFile% %sDestination%
  44. )
  45.  
  46. START "MSAccess.exe" %sDestinationFile%
Once you have the Script and you are comfortable with it, you would need a Version file and a Shortcut to the Batchfile:
  • In this case the Version file is a text file that only contains the application Version number. I attached one as it's probably easier to understand that way. (a version file is worth a thousand words)
  • You may not need a Shortcut, but I found it easier with our infrastructure to create the shortcut and supply it to our IT department, who then copies it to all the users Desktop. It would have been nice to email all the users a copy of the Shortcut, but our Outlook Server will instantly delete any *.lnk file. Regardless, the Shortcut would point to the Batch file and in this example the target would be: \\DeploymentServer\Applications\CoolProgram\CoolPr ogram.cmd

Once this is all setup, all the users would have to do is launch the Shortcut. The Batchfile would be located over the network and executed. Which would check the Version file and copy down the Access database if it is missing or if a new one is available. Then it would launch Access and open the latest Database. To deploy a new version, create your new compiled database and place it in the deployment directory, then increment the version number in the CoolProgram.txt and you are done.

There are other methods, but these are the ones I'm familiar with. I know you'll probably put your own spin on it and I would be interested to see what that is.
Attached Files
File Type: txt CoolProgram.txt (6 Bytes, 204 views)
Aug 11 '16 #2
PhilOfWalton
1,430 Expert 1GB
Thanks for very comprehensive reply.

It appears that I had written most of Twinnyfo's code before I got your reply.

My DOS is shaky, but I dare say I will get to grips with your script. However, the "a version file is worth a thousand words" link appears to be broken. I am hoping that will make things clearer

Thanks again

Phil
Aug 12 '16 #3
jforbes
1,107 Expert 1GB
I attempted to re-upload the version text file and update the link. Let me know if it is still broke for you.

The script is actually pretty simple when it's broken down into it's parts:
  • Lines 1-2 clear the screen.
  • Lines 3-6 global variables/constants for the different parts to be deployed. That way the stuff you would most likely change is all in one place.
  • Line 8 gets the Users Directory from Windows, usually "C:\Users\{UserID}"
  • Line 9-10 Determines some Source file locations based on the information gathered so far.
  • Lines 12-14 Determines the File Destination locations based on the previously gathered info.
  • Lines 16-17 Sets up Version Variables and Default them to zeros.
  • Line19-20 Read the Version Files and load their contents in the Version variables.
  • LIne 21 Defaults the Destination Version to 0 if the local Version file was empty or missing. (we probably don't need lines 16-17 because of this)
  • Lines 23-31 Report to the user what was found out about the Versions files so far. Sometimes it's nice to know how old the installed version is.
  • Lines 33-36 Make sure the install directory exists.
  • Lines 38-44 If the installed version is older than the available one, install the latest version of the application and let the user know what is going on.
  • Line 46 launches the latest version of the Applicaiton.
Aug 12 '16 #4

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

Similar topics

9
by: amitavabardhan | last post by:
How Can I extract multiple tiff images into single images through asp programming? Is there any free dll's that I can use in ASP to split multiple tiffs into single tiffs? Any suggestion...
3
by: Therese A. Sorna | last post by:
Hello all... I am trying to develop a database that could be duplicated many times over with different data (separated by project) in each database, but the same front end information. I was...
4
by: Tempy | last post by:
I am not a programmer, but love to dabble with VBA, mainly in Excel, but I have made an Access data base which is getting a bit outa hand for me!! I am using it to display information only; as a...
3
by: John Phelan-Cummings | last post by:
I have a front-end application called, “inbusiness.mdb” and three back-ends databases called, “inbusinessClient_be.mdb”, “inbusinessFund_be.mdb”, and, “inbusiness_be”. I created three back-ends...
5
by: The alMIGHTY N | last post by:
Hi all, Let's say I have a simple math formula: sum (x * y / 1000) / (sum z / 1000) I have to do this across 50 items, each with an x, y and z value, when the page first loads AND when a...
4
by: cyberdrugs | last post by:
Hi guys 'n gals, I have a string which contains multiple spaces, and I would like to convert the multiple spaces into single spaces. Example Input: the quick brown fox jumps ...
9
by: Kelii | last post by:
Currently I have a button that allows the user to "Close Company" - at the moment it doesn't do anything :D I would like the button to "disconnect" the back end then show my Open Company form. ...
15
by: sherryj2 | last post by:
Hello, I'm a total newbie here, but I have been searching for days for the answer to this without any luck. I used your function to refresh my linked tables upon opening the front end of my...
3
by: ahd2008 | last post by:
Hi everyone, Hope someone can help with my issue. I have two back-ends that I use for my tracking system. Now, I need to transfer one table records (not all the records, some records) from one...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.