944,038 Members | Top Members by Rank

Ad:
0

code to split (and reconnect) an Access database (part 2)

by on Apr 22nd, 2005
Place the file with part one of the code on the server. This part of the code gets placed in a batch file (text file with the extension *.BAT) and placed on each client's machine. Again, you will need to change the paths used to the real paths on your network. This will get a fresh copy of the front end each time the database is launched in this method - all revisions saved to the MDE file on the server will be reflected the next time a user launches the file in this method.
Visual Basic 4 / 5 / 6 Code Snippet (Toggle Plain Text)
  1. General formula:
  2.  
  3. Echo off
  4. Echo Copying Database
  5. copy "Source Path" "Destination Path"
  6. start "Access Path" "Destination Path (from above)"
  7.  
  8. =======================
  9. a real example:
  10.  
  11. Echo off
  12. Echo Copying Database
  13. copy "G:\Richard's Work\License Keys Front End.MDE" "c:\Documents and Settings\Family.Avalon2\My Documents\Richard's Work\License Keys Front End.MDE"
  14. start "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "c:\Documents and Settings\Family.Avalon2\My Documents\Richard's Work\License Keys Front End.MDE"
  15. =====================================================
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: tranmit sound
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: code to validate data in Access withOUT using messageboxes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC