Automatic Front End Database Updating

Have you found this topic useful/helpful?


  • Total voters
    12
Hi, I have similar environment and have got the automatic updating of front end to work via the batch file etc.
But - a lot of users on the network have slower pc's and connections. If the db closes, copies from server, and as it is copying the user opens it - the database corrupts. I have certain databases that are 20+MB and take about a minute to copy from server to local pc. There's no indication to the user that the database is still being copied and therefore they will open it while its being copied and cause it to corrupt. Please can someone advise on how to get around this. Is there a way to put a lock on an Access db until it has been fully copied from server to pc.
Thanks
 
Last edited:
You might want to just disable the automatic reopening part and just give them a message that they need to try again in, say 2-5 minutes. You could try putting a loop in to pause the batch file trying to reopen, but you'll still not know for sure if the db has downloaded fully.
 
Hi guys, I am the one who originated this topic and over time I have come up with a new method to handle all of this that is more user friendly as it will show a progress bar and messages to let the user know what is going on. Also one thing I do if I am updating the database on the users local PC. I have the mdb file deleted as the 1st step then I have the file copied as a new file (prevents opening of the database, because technically it won't be there if they try to open it) I will try and post up some images of what my new setup looks like a little later.

Instead of using batch files I create an exe file that handles all of the processes using a program called SciTe do a search for that and I am sure it will help you like it helped me. I know my database users like it much better.
 
That's great to hear. Unfortunately in my case, I work for a very large healthcare company and they don't let us install custom programs like that, so I had to go the way of the dynamically created batch file.
 
gold007eye, I had a look at SciTe but I'm not sure what to do with it in relation to what we're talking about. I would be very curious to see what you have finally come up with as your copy front end solution, so will await your next post.
I need to create some kind of startup logon script that will detect when the user logs into the pc what databases need updating and update them.
I then need a check when launching any of the databases to check if its the latest version and if not do an update.
In either case I need a way of preventing the user opening the database if it is still currently being copied. Telling them to wait for a few minutes or running a timer will not work in my company, some databases take 10 seconds to copy, some take 5 minutes. I need a way of preventing the user opening the database (with a message) if it is currently being copied, only allow them in when FULLY copied.
Will check back later for your post.
Cheers.
 
Last edited:
boblarson said:
That's great to hear. Unfortunately in my case, I work for a very large healthcare company and they don't let us install custom programs like that, so I had to go the way of the dynamically created batch file.

You would only need it on your own computer as the developer. Once you have created the code it compiles it to an .exe file and you just have the database point to the .exe for the update from a central location.
 
Here is an example of the code I use in SciTE for a new install of the database:
Code:
;Script to Install PELA (Without the need for a .bat file and using less code with more accurate results.)
;
;Script created by Jason Boney 10/10/2006
ProgressOn("PELA is Now Installing", "Please Wait.....", "0 percent")
For $i = 1 to 100
    sleep(25)
    ProgressSet( $i, "Installing... " & $i & "%")
Next
#include <Process.au3>
$rc=_RunDOS ("c:")
;Copies over the PELA.mdb file from the G:\ Drive and if C:\PELA\ doesn't exist; it will create the folder otherwise it will just overwrite the current file.
FileCopy("G:\Hingham Drives\G Drive\MCU\PELA\PELA.mdb","C:\PELA\",9)
;Copies over the PELA shortcut link from the G:\ Drive and overwrites the current file.
FileCopy("G:\Hingham Drives\G Drive\MCU\PELA\PELA_Live.lnk","D:\Documents and Settings\All Users\Desktop\",1)
FileCopy("G:\Hingham Drives\G Drive\MCU\PELA\PELA_Live.lnk","C:\PELA\",1)
ProgressSet(100 , "100%     Installation Complete!", "Installation Completed")
sleep(1000)
ProgressOff()

MsgBox (0+64, "PELA Has Been Installed", "Now Starting PELA"& @CRLF & @CRLF & "Please Wait.....",1)
;Code used to Start PELA after a fresh install.
$rc=_RunDOS(@COMSPEC & " /c Start c:\PELA\PELA.mdb")
As you can see most of it follows DOS type coding.

Here is an example of the SciTE code I use for updating the database:
Code:
;Script to update PELA to a new version. (Without the need for a .bat file and using less code with more accurate results.
;
;Script created by Jason Boney 10/10/2006
ProgressOn("PELA is Now Updating to a NEW Version", "Please Wait.....", "0 percent")
For $i = 1 to 100
    sleep(25)
    ProgressSet( $i, "Updating... " & $i & "%")
Next
#include <Process.au3>
$rc=_RunDOS ("c:")
;Copies over the PELA.mdb file from the G:\ Drive and if C:\PELA\ doesn't exist; it will create the folder otherwise it will just overwrite the current file.
FileCopy("G:\Hingham Drives\G Drive\MCU\PELA\PELA.mdb","C:\PELA\",9)
;Copies over the PELA shortcut link from the G:\ Drive and overwrites the current file.
;FileCopy("G:\Hingham Drives\G Drive\MCU\PELA\PELA_Live.lnk","D:\Documents and Settings\All Users\Desktop\",1)
FileCopy("G:\Hingham Drives\G Drive\MCU\PELA\PELA_Live.lnk","C:\PELA\",1)
ProgressSet(100 , "100%     Update Complete!", "Update Completed")
sleep(1000)
ProgressOff()

MsgBox (0+64, "PELA Has Been Updated", "Restarting PELA"& @CRLF & @CRLF & "Please Wait.....",1)
;Code used to restart PELA with the new version now installed.
$rc=_RunDOS(@COMSPEC & " /c Start c:\PELA\PELA.mdb")

I attached some pictures of how it looks.
 

Attachments

  • Updating.jpg
    Updating.jpg
    7.9 KB · Views: 288
  • Update_Complete.jpg
    Update_Complete.jpg
    9.1 KB · Views: 235
  • Restarting_Database.jpg
    Restarting_Database.jpg
    7 KB · Views: 240
  • Main_Menu.jpg
    Main_Menu.jpg
    44.5 KB · Views: 240
  • Icons.jpg
    Icons.jpg
    9 KB · Views: 256

Users who are viewing this thread

Back
Top Bottom