Druid
Fully Optimized
- Messages
- 3,065
I have to code a re-linker for my internship, but my programming experience isn't very advanced and I'm hoping someone can direct me with some reading on how to figure out how to do this. It has the following requirements:
GUI Mode Operation
• Should have a GUI very similar to the screenshots attached at the bottom; the “Start Validation†button is not retained and some column names are changed
• Must have a “Select Databases†button
o Must launch a file dialog to select databases into the “Selected Databases†grid
o The file dialog must restrict selectable files to those with extensions of type “Access Databases (*.mdb)â€
o The file dialog should allow selection of multiple databases to wholly replace the list of previously selected databases
o If the file dialog does not allow selection of multiple databases:  Newly selected databases must be appended to the list of previously selected databases
 A mechanism must be provided to remove previously selected databases from the grid
• Must have a “List Links†button
o Must enumerate all linked tables in all selected databases
o Must display and order the results in the bottom grid ordered by Database first, then by Table Name
• Must have a “Re-Link†button that activates the re-linking process
• Must have a “Selected Databases†grid
o The grid must have a read-only column for the input database full path (“Input Database Pathâ€) and a writable column for the output database name (“Output Database Nameâ€)
o Entries in the grid must be sorted in alphabetical order by full input database path
• Must provide a help link/menu item that collectively describes each of the command line arguments, shows acceptable values for each of the arguments and shows one or more examples of valid command lines
Command Line Mode Operation
• Must accept the following command line arguments:
o /P={path} where {path} is the fully qualified path to the databases that need relinked (e.g. /P=C:\Temp)
o /I={database} where {database} is the filename of an input database (e.g. /I=etata.mdb)
o /O={database} where {database} is the filename of an output database (e.g. /O=etata01.mdb)
• If valid command line arguments are provided, must automagically display the GUI, populate form controls with the passed arguments, execute the linking operation and exit
• If invalid command line arguments are provided, must run in GUI mode
• Command line arguments are valid only if:
o A path argument (/P) is specified and resolves to a valid path in the file system
o All input database arguments (/I) precede all output database arguments (/O) on the command line (i.e. at least four input database arguments should typically be expected)
o Each input database argument (/I) is matched with exactly one output database argument (/O)
o Each input database argument (/I) exists at the specified path argument (/P)
o The application has rights to write to the specified path argument (/P)
Re-Linking Operation
• Must allow the input database name and output database name to be the same (each /I = /O)
• When an output database has a different name than its corresponding input database (each /I ≠/O), the input database should be copied to the output database filename prior to performing linking operations
• Must open each output database and update linked tables in the following manner:
o A linked table must not be updated if the source database for the table does not match any of the input database names
o A linked table must be updated when the source database matches any of the input database names, such that:
 The input database name is replaced by the corresponding output database name
 The fully qualified path to the database is replaced with the path argument (/P)
• Should log the success/failure of the following operations: connecting to a database, retrieving the linked table list, re-linking an individual table, disconnecting from a database
• Must notify the user of the overall success/failure of the operation
Thanks!
GUI Mode Operation
• Should have a GUI very similar to the screenshots attached at the bottom; the “Start Validation†button is not retained and some column names are changed
• Must have a “Select Databases†button
o Must launch a file dialog to select databases into the “Selected Databases†grid
o The file dialog must restrict selectable files to those with extensions of type “Access Databases (*.mdb)â€
o The file dialog should allow selection of multiple databases to wholly replace the list of previously selected databases
o If the file dialog does not allow selection of multiple databases:  Newly selected databases must be appended to the list of previously selected databases
 A mechanism must be provided to remove previously selected databases from the grid
• Must have a “List Links†button
o Must enumerate all linked tables in all selected databases
o Must display and order the results in the bottom grid ordered by Database first, then by Table Name
• Must have a “Re-Link†button that activates the re-linking process
• Must have a “Selected Databases†grid
o The grid must have a read-only column for the input database full path (“Input Database Pathâ€) and a writable column for the output database name (“Output Database Nameâ€)
o Entries in the grid must be sorted in alphabetical order by full input database path
• Must provide a help link/menu item that collectively describes each of the command line arguments, shows acceptable values for each of the arguments and shows one or more examples of valid command lines
Command Line Mode Operation
• Must accept the following command line arguments:
o /P={path} where {path} is the fully qualified path to the databases that need relinked (e.g. /P=C:\Temp)
o /I={database} where {database} is the filename of an input database (e.g. /I=etata.mdb)
o /O={database} where {database} is the filename of an output database (e.g. /O=etata01.mdb)
• If valid command line arguments are provided, must automagically display the GUI, populate form controls with the passed arguments, execute the linking operation and exit
• If invalid command line arguments are provided, must run in GUI mode
• Command line arguments are valid only if:
o A path argument (/P) is specified and resolves to a valid path in the file system
o All input database arguments (/I) precede all output database arguments (/O) on the command line (i.e. at least four input database arguments should typically be expected)
o Each input database argument (/I) is matched with exactly one output database argument (/O)
o Each input database argument (/I) exists at the specified path argument (/P)
o The application has rights to write to the specified path argument (/P)
Re-Linking Operation
• Must allow the input database name and output database name to be the same (each /I = /O)
• When an output database has a different name than its corresponding input database (each /I ≠/O), the input database should be copied to the output database filename prior to performing linking operations
• Must open each output database and update linked tables in the following manner:
o A linked table must not be updated if the source database for the table does not match any of the input database names
o A linked table must be updated when the source database matches any of the input database names, such that:
 The input database name is replaced by the corresponding output database name
 The fully qualified path to the database is replaced with the path argument (/P)
• Should log the success/failure of the following operations: connecting to a database, retrieving the linked table list, re-linking an individual table, disconnecting from a database
• Must notify the user of the overall success/failure of the operation
Thanks!