Re-Linker

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!
 
Couldn't see anywhere in the post but maybe it is. What language does this have to be written in? Depending on its structure and capabilities, you have to plan around that to consider using the strengths and minimizing the weaknesses of your language of choice.

Seems like a pretty robust application you have to develop!
 
Besides the language, what OS is it going to be used on? Does it have to be cross-platform, or is it only for Windows / Linux / etc.?
 
I have to do it in visual basic in visual studios, which I've never used before. I keep getting caught up on little things. Any idea on where to learn this fast. I looked at a few small tutorials that at least gave me a low level of understanding, but I'm really not making any progress. I'm getting errors and stuff just trying to test out little things. Like, I don't know what methods to use to do stuff and how it should be structured. Is there a fast place to reference to learn visual basic? Never used it before.

New Requirements: Database Re-Linker Requirements v1.2

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 disable the “Re-Link” button unless at least two input databases have been specified
• 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 the “Selected Databases” grid with the passed arguments, execute the linking operation and exit
• If invalid command line arguments are provided, must switch to 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 At least two arguments for input databases (/I) are present (four or five are typically expected)
o All input database arguments (/I) precede all output database arguments (/O) on the command line
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 for the situation where the input database name and output database name are the same (each /I = /O)
• Must allow for the situation where the input database name and output database name are different (each /I ≠ /O)
• Should use a call to DatabaseRelinkLibrary.DatabaseRelinker.ChangeDatabaseLinks to perform the linking operation
• Should notify the user of the overall success/failure of the operation, including the number of tables that were able to be re-linked up to the point of completion or failure
 
Back
Top Bottom