Change to having each collector collect both programs on the same laptop: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
Line 10: Line 10:


==== Implementation details ====
==== Implementation details ====
{{Collapsable | always=shortcut details | full=  
 
* Start by passing a parameter to the program as a command line switch from the starter icon, e.g. 
{{Collapsable | always=desktop shortcut | full=  
/cmd c:\ccmdb_data\ccmdb_data_m.mdb}}
* double-clicking on a powerscript file will by default open it in an editor, so we made a shortcut to run the script instead of editing it. }}
 
{{Collapsable | always=powershell script details | full=
* the script [[ccmdb_starter_both.ps1]] opens the first file with command line parameters, waits for the user to click enter, and then opens the second one
* powershell was used because batch would not process command line parameters right
* the two file starts are separated by user having to click OK in the script to make sure they are actually logged in in the correct order
}}


{{Collapsable | always=implementation inside CCMDB_*.accdb | full=  
{{Collapsable | always=implementation inside CCMDB_*.accdb | full=  

Revision as of 08:10, 2023 August 4

Collector instructions

yet to come

Implementation

News and backup

Laptop configuration

Copy the two shortcuts CCMDB C and CCMDB M from Regional Server\where? (full address: \\ad.wrha.mb.ca\WRHA\REGION\SHARED\ICU_DATA_COLLECTION\where?) to the all users desktop of the laptop.

Two copies of ccmdb.accdb need to be present, since you can't open a second instance of the same file. Each copy is loaded via a shortcut on the desktop. One of the s

Implementation details

desktop shortcut   
  • double-clicking on a powerscript file will by default open it in an editor, so we made a shortcut to run the script instead of editing it.
powershell script details   
  • the script ccmdb_starter_both.ps1 opens the first file with command line parameters, waits for the user to click enter, and then opens the second one
  • powershell was used because batch would not process command line parameters right
  • the two file starts are separated by user having to click OK in the script to make sure they are actually logged in in the correct order
implementation inside CCMDB_*.accdb   
  • The program attempts to read the data file name from the command line via VBA using Command(). If no command line parameter is given the old standard ccmdb_data.mdb is used.

Paths not taken

same ccmdb.accdb, different command line parameters   
  • this didn't allow opening the second instance while the first is open.
collecting programs in same Access DB   
  • This would require major changes to cross checks, form hiding and other places, and since we are likely moving away to SF it wasn't worth it.
Store data file path info in settings   
  • The settings are stored in the data file, so CCMDB.accdb wouldn't know where to get the data.

Related articles

Related articles: