Re-Linker - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Programming
Click Here to Login
Reply
 
Thread Tools Display Modes
 
Old 07-12-2012, 02:01 PM   #1 (permalink)
Wizard Techie
 
Druid's Avatar
 
Join Date: Nov 2008
Posts: 3,065
Default Re-Linker

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!
__________________

__________________
CPU: Intel Core i7 920
GPU: ASUS STRIX GTX 970
Ram: 12GB 1600 Mhz DDR3
Mobo: ASUS P6T
PSU: 750W PC Power & Cooling
Druid is offline   Reply With Quote
Old 07-13-2012, 02:26 PM   #2 (permalink)

Triforcer
 
Baez's Avatar
 
Join Date: Sep 2005
Location: Toronto, Canada
Posts: 6,987
Default Re: Re-Linker

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!
__________________

__________________


Baez is offline   Reply With Quote
Old 07-13-2012, 02:46 PM   #3 (permalink)
Private Joker
 
carnageX's Avatar
 
Join Date: Feb 2007
Location: South Dakota
Posts: 24,515
Default Re: Re-Linker

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.?
__________________
Laptop: MSI GT70 2OC-059us | i7-4700MQ | 16GB | GTX 770m | 500GB SSD / 750GB HDD | 17.3" | Win10 Pro
Desktop: 4690k | 12GB g.Skill RipJaws | GTX 970 | 520hx | Z87X-UD4H | Corsair Vengeance C70 | Corsair H110 | Acer 25" | Acer 22" | Win10
Mobile: Samsung Galaxy Note 5


If I help you, or you just like what I said, rep me by clicking the under my post
carnageX is offline   Reply With Quote
Old 07-17-2012, 04:48 PM   #4 (permalink)
Wizard Techie
 
Druid's Avatar
 
Join Date: Nov 2008
Posts: 3,065
Default Re: Re-Linker

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.ChangeDatab aseLinks 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
__________________
CPU: Intel Core i7 920
GPU: ASUS STRIX GTX 970
Ram: 12GB 1600 Mhz DDR3
Mobo: ASUS P6T
PSU: 750W PC Power & Cooling
Druid is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate File Hard Linker Osiris Tips, Tricks & Tutorials 0 09-27-2010 08:29 AM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 12:58 AM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.