Best Coding Process For This?

I have a need to deisgn a windows form that has 6 tickboxes and a button.  Based off the tickboxes selected will open that specified access database, search for table names if found, delete those tables, then import "fresh" copies of the tables.
 Close the database, then proceede to perform the same operation on the next database until all databases with Check = Yes expire.  This is going to be a huge redundancy of code, is their a way for me to have a few re-usable procedures to perform
the same process repeatedly?
Below is some pseudocode showing an example if 4 tickboxes were checked
Open DB1
Search For Tables (will be listed in an array) - if found delete, if not continue searching
Link In New Table
Close DB1
Open DB2
Search For Tables (will be listed in an array) - if found delete, if not continue searching
Link In New Table
Close DB2
Open DB3
Search For Tables (will be listed in an array) - if found delete, if not continue searching
Link In New Table
Close DB3
Open DB4
Search For Tables (will be listed in an array) - if found delete, if not continue searching
Link In New Table
Close DB4

Create a class for the database functions like the code below
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace WindowsFormsApplication1
public partial class Form1 : Form
public Form1()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
string FILENAME = "Enter database name here";
ProcessDataBase processDataBase = new ProcessDataBase(FILENAME);
List<string> tables = processDataBase.GetTableNames();
public class ProcessDataBase
OleDbConnection conn = null;
public ProcessDataBase(string filename)
string connStr = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Persist Security Info=False;", filename);
conn = new OleDbConnection(connStr);
public List<string> GetTableNames()
List<string> tableNames = new List<string>();
// enter code to search tables
return tableNames;
jdweng

Similar Messages

  • Had a windows computer with my element 7.  Now just bought a Mac OSX   version 10.9.2 what would be the best photoshop elements for this machine.  I did download elements 12 from Apple store but kept getting incompatible message when trying to open a phot

    I thought elements were simple but maybe it is just me.  Having problems moving photos from iphoto to elements

    Duplicate post; see:
    had a windows computer with my element 7.  Now just bought a Mac OSX   version 10.9.2 what would be the best photoshop elements for this machine.  I did download elements 12 from Apple store but kept getting incompatible message when trying to open a phot

  • APP-OFA-48392: Depreciation has been processed for this asset

    Hi,
    we are working in oracle applications 11i.
    In Oracle assets module, on the attempt from the user to modify the description of an asset item (from asset workbench -open) , when clicking the DONE button, the following error shows up:
    APP-OFA-48392: Depreciation has been processed for this asset for the current period in book...
    Please rollback depreciation or close the current period to perform this transaction
    Any ideas please...

    Hi
    If you have run depreciation for a particular period and thereafter try to make modification to any asset in the same period - the system will not allow you to do the same.
    If you have to make the changes than perform either of the following steps as mentioned below:
    1) rollback the depreciation for the current period by running the Rollback Depreciation program from the SRS Window
    OR
    2) Close the period by running the depreciation and thereafter make the changes to the asset in the next period.
    Without doing the above, the system will not allow you to make the changes to the asset.
    Hope this helps.
    Thanks
    Manish Jain.

  • I would like to build a desk top computer for video editing, business management and online learning and also have a small compatible laptop or tablet or ipad to take to university, Can someone please advise me of the best set up for this?

    I would like to build a desktop computer for video editing, business management and online learning and also have a small laptop, tablet or ipad to take to university, Can someone please advise me of the best set up for this?

    Let's see if I understand this...   You're asking for advice on building a desktop computer, in the Apple developer's forum?  Why not just buy a Mac?

  • Best as3 approach for this website...

    Hi everyone!
    This post will be a little bit long and I thank you in advance for the patience and help. Sorry for any (or all) English errors. I'm brazilian.
    Well, I want to reconstruct a website I have but now using as external .swf and .as files as I can. Also I need to change the way it works.
    I have problems with loaders but I'm decided to dive into the subject and put it into practice here, for the first time.
    The website will be really simple and here I have a scheme I just made to help you understand what are my doubts.
    How this is going to work?
    - When the user clicks a button, the current section will slide out (maybe unload?) while  the new section slide in. This is the basic functionality.
    - The website will have a home page when the user clicks the company logo.
    - In the scheme you see all 4 sections but only one will be visible. The others will be hidden by a  mask.
    To start, I guess the best thing I can do is built each section in a separeted .fla file to have 4 external .swfs to load.
    Then I thought about loading all 4 sections inside a sprite container. Then, "onSectionClick" slide the sprite to the right X position to show the correspondent section.
    Now, what's the best approach to achieve that? The obvious is that each section should load only when the user clicks a button. Should each seaction has its own loader? When is the user going to see the message "loading section" or progress bar? Should I slide the section in onLoadingComplete or should I slide it in and show the message/progress bar? Should I unload the current section when that slide out?
    I also thought about working with two sprites. One to loadSection and slideIn and another to load another section. Then, onSectionClick the currentSprite slideOut while the other slideIn and on background the first sprite unloads its content, change its X position and get ready to load another section when requested.
    I think that's all.
    I have this thing working but it's terrible because all sections load at once and there's no loading progress or whatsoever.
    And thanks again!

    thanks kglad!
    So every section will become a distinct part of the site.
    I was really thinking about making every section an external .swf instead of exporting movieClips from stage (linkage option). Which one is better?
    As I said, Andrei helped me with the loading process. Actually he's still helping me but with what he already taught me I think I'll be able to do the loading thing.
    Anyway, to make my life easier, imagine that all sections will tween to stage from the right side of it... to do that I'll have an onLoad method that will run when the loading process has finished. This method will call other two methods, slideOut and slideIn.
    slideIn will only bring the loaded .swf loader on stage (from the right side) while the slideOut will push the current .swf out of stage (to the left side), unload it and finally be positioned at the other side of the stage (right) to receive the next section when requested?
    Is this the best way to do this?
    I think this is so confusing that not even you will understand what I'm trying to say.

  • What is the best design pattern for this problem?

    No code to go with the question. I am trying to settle on the best design pattern for the problem before I code. I want to use an Object Oriented approach.
    I have included a basic UML diagram of what I was thinking so far. 
    Stated simply, I have three devices; Module, Wired Modem, and Wireless Modem.
    In the Device Under Test parent class, I have put the attributes that are variable from device to device, but common to all of them.
    In the child classes, I have put the attributes that are not variable to each copy of that device. The attributes are common across device types. I was planning to use controls in the class definition that have the data set to a default value, since it doesn't change for each serial number of that device. For example, a Module will always have a Device Type ID of 1. These values are used to query the database.
    An example query would be [DHR].[GetDeviceActiveVersions] '39288', 1, '4/26/2012 12:18:52 PM'
    The '1' is the device type ID, the 39288 is the serial number, and the return would be "A000" or "S002", for example.
    So, I would be pulling the Serial Number and Device Type ID from the Device Under Test parent and child, and passing them to the Database using a SQL string stored in the control of the Active Versions child class of Database.
    The overall idea is that the same data is used to send multiple queries to the database and receiving back various data that I then evaluate for pass of fail, and for date order.
    What I can't settle on is the approach. Should it be a Strategy pattern, A Chain of Command pattern, a Decorator pattern or something else. 
    Ideas?

    elrathia wrote:
    Hi Ben,
    I haven't much idea of how override works and when you would use it and why. I'm the newest of the new here. 
    Good. At least you will not be smaking with a OPPer dOOPer hammer if I make some gramatical mistake.
    You may want to look at this thread in the BreakPoint where i trie to help Cory get a handle on Dynamic Dispatching with an example of two classes that inherit from a common parent and invoke Over-ride VIs to do the same thing but with wildly varying results.
    The example uses a Class of "Numeric"  and a sibling class "Text" and the both implement an Add method.
    It is dirt simple and Cory did a decent job of explaining it.
    It just be the motivation you are looking for.
    have fun!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • What are the best coding standards for ADF 11g?

    Hi,
    Do we have any link that will suggest the best coding standard practices used for ADF 11g?
    I am looking out from the perspective of some standards that can be defined before starting my project to know the team on how to
    1. Minimize Duplicity and max reusability of code
    2. Package the code
    3. Resource bundle usage and its calls
    4. Maintainning format consistency eg. date display format, number format
    5. Exception handling
    6. Logging
    7. Namiing conventions
    Also then we might have standards on
    1. Task flow dev.
    2. EO and VO creation standards
    3. UI development standards [purely ADF component based]
    Thanks in advance
    Edited by: user8925296 on May 26, 2010 3:24 PM

    The ADF Enterprise Methodology Group has a page on standards that gives you a starting point on many of your questions: http://groups.google.com/group/adf-methodology/web/adf-coding-standards
    John

  • I have to create a presentation about waste water management. The students needs to see how the water flows in the system. Which is the best Adobe program for this task?

    I need to show dirty water, the treatment, and the clean water after treatment. It is necessary to see how the water flows in the tubes.
    Which is the best Adobe program fr this job? 

    After Effects, but be ready for a steep learning curve. Third party plug-ins may be required if you want realistic flow. Schematic diagrams are fairly easy to create with After Effects. I do it all the time.

  • What is best word processing for the iMac?

    What is best word processing to use on my imac?

    Depends. What word processing are you doing?
    Word is probably the most capable, but do you need all that capability? Pages is very good, but not as powerful, as are Nisus Writer and Mellel. But it comes down to the kind of power you need: You writing blog posts? Novels? Doctoral Theses? Letters to your Mummy? Each of these can be done in Word, but if you're only writing notes home then Word is overkill. If you need academic standards - citations, footnotes etc - then Word, Pages, Nisus etc. If you're writing a Novel or long project something like Scrivener or Ulysses 3 are likely better.
    So... the best is the one appropriate for the writing you're doing - which is that?

  • Best business process for "small recurring purchases"?

    Hi
    How is YOUR best practice for procurement of "small recurring goods/services"? Overall we want as easy a business process as possible, although still adhering to basic business control objectives.
    Basically we think we have two options:
    - MM-based flow with a PReq, PO, GR/SE, invoice reg
    - FI-based flow with invoice registration (including our own sap custom developed workflow for GR and cost approval)
    Examples of the goods/services in question are recurring costs, such as:
    - phone
    - cell phone
    - broad band services (DSL)
    - gasoline
    - subscriptions of magazines and likewise
    All characterized by being recurring services, almost fixed amount, multiple GR/SE and not "large costs".
    Our internal controls (internal audit!) demand that TWO persons should be involved before paying an invoice.
    - In MM-flow we do this by having a PReq/PO release procedure (value-based individual limits) plus a GR-requirement. If the invoice then matches PO and GR/SE, accounts payable will simply pay! If not, then AP will contact PO-creator. One of the big advantages of the MM-flow is that the statistics are much better compared to a FI-flow.
    - In FI-flow, we have our own workflow functionality, that sends an invoice to the "goods receiver" for GR/SE; and subsequently send it to the "cost responsible for cost approval.
    We have been looking at various options:
    A. PO of type frameorder with item category B (limit). However, our problem is that GR is NOT allowed. So only "one person" is involved, if the invoice price matches the PO.
    B. PO of type frameorder with item category D (service). GR is technically allowed, so everything is OK. Question is how can we help to NOTIFY the requisitioner? A phone bill comes every calender quarter. How to make the service entry "easy to do"?
    C. FI invoice (with our own sap workflow to enable GR requirement). However, this way every invoice need approval. There is no timesaving, in case that the invoice matches... And no statistics anyway. We are doing this now ... but it does NOT seem optimal.
    D. Individual PO - one for each invoice - same as Z., but of course statistics ok. Takes too much time!
    How do YOU handle this business process? Everyone HAVE these purchases, so please comment on this ...
    Thanks

    You can start by reading this:
    http://macrory.com/blog/2006/04/bookkeeping_on_the_mac.html
    As for which on is better that depends on what your business needs are... you can always download a trial and see if you like the apps before you buy

  • Best hdmi cable for this television sony KDL55EX500

      also for my ps3 to this particuliar tv
    can anyone tell me wich cable to buy number wise for hdmi to get best full 1080 hd

    NoNoBadDog wrote:
    The best one is the cheapest you can find in the length you need.  On consumer equipment, there is *NO* difference between a $5 cable and a $150 dollar cable.  There are some that will mumble about gold plated connectors or some mumbo jumbo about shielding (which makes no difference to a digital signal, which is what all HDMI cables are), but it is all smoke and snake oil, designed to liberate as much money form your back account as they can...
    Do not be fooled by the hype and the bullsh*t; and get the cheapest cables you can find.  Use the money you save to buy a few good movies, or take your significant other to dinner...
    Actually, gold plated connectors are important for corrosion resistance and shielding is critical for all high-bandwidth digital signals.  (I've seen plenty of systems fail EMI testing where I work due to improper shielding.)
    However - even the cheapest HDMI cables I've found have gold plated connectors and proper shielding.
    So to the original poster:  The best cable for you is the cheapest one that is:
    HDMI High-Speed certified
    Long enough
    Things that are nice but not critical:
    24AWG wires - the premium cables from my favorite supplier are in this category.  The cheap ones are 28AWG.  (Larger number = thinner wire).  24AWG wires will make the cable more reliable and also more durable, but also less flexible.  The big ripoff artists like Monster won't even tell you this particular specification!  If you are paying more than $10 for a 6-foot 24AWG cable, you are paying too much by the way.
    Net/mesh jacket/sheath - provides a little extra protection for the cable and looks nice too.  Still, again - don't pay more than $10 for a 6-foot cable or you're getting ripped off.
    *disclaimer* I am not now, nor have I ever been, an employee of Best Buy, Geek Squad, nor of any of their affiliate, parent, or subsidiary companies.

  • Best word processing for mack air

    what is the best mack air word process app for mack air

    Pages from App store.
    If you are using Microsoft Word, keep using it.
    Best.

  • Best coding language for dynamic dropdown with prices

    Any good references for starting points in PHP?

    Morning!We run a customer counter for sales and service that has different pricing levels. I have been tasked with making a simple internal website to allow our sales staff to quickly price a custom hose assembly. (Rather than refer to paper catalogs that might be out of date and manually calculate on paper slips). Basically looking for the simplest coding language to create the internal site that will allow the following:Customer comes in for custom hose assembly. 5 options have to be selected then a final price generated based on each option.
    EX: Type of Hose (list of 20 types); First Fitting, Second Fitting (each has 20 - 50 choices with price for each); Length in Feet (1 - 100 with different price per each foot), and then finally what price book to reference (Pink +30%totalprice,blue+10%total price, Yellow +0%totalprice.)
    I can...
    This topic first appeared in the Spiceworks Community

  • What is the best Skype setup for this scenario?

    I live in the United States and about to be deployed to Afghanistan for about one year.  I will have a laptop and an International capable Android phone, both with Skype software installed.  I want to be able to use Skype to Skype via the laptop, and also be able to call both landlines and cell phones in the United States while I am in Afghanistan.  What would be the best Skype subscription plan in this scenario to keep costs to a minimum.

    Hi,
    As you probably know, Skype to Skype calls are free, but if you wish to call phones then you would need a subscription that covers calling destination.
    You might find Unlimited US&Canada subscription from: http://www.skype.com/go/subscriptions
    Fair usage policy applies, but 6hours per day should be more than enough to call your family and friends back home in US.
    http://www.skype.com/go/terms.fairusage
    Skype also offers Online Numbers for US. For example if you purchase an Online Number in US then your friends who don't have Skype can call that number. They will be charged with local rates and call will be directed to your Skype account when you are online on your phone or laptop.
    Tip: If you do decide to purchase an Online Number for 12months then purchase calling subscription first and you will get 50% discount on Online Number.
    https://support.skype.com/en/faq/FA331/What-is-an-Online-Number
    Andre
    If answer was helpful please mark it with Kudos and if issue is resolved mark it with solution. This will help other users find this answer more easily. Thanks in advance!

  • Best connection process for oracel ADF?

    hi all,
    i am using oracle jdeveloper 11g 2 release and oracle database 10g. now i used database connecion in choosing Application resource type. i need to know what is the best way for connect with db? is it db connection ,JMX, URL, or WebDAV? because of i am going to make finally enterprise software for large company(4000 users use) .so number of users need to keep their connection because they are in different location. therefore show me what is the best path for keeping connection with oracle db? There is no any web service. so show me is there any connection method, because of timeout can be happen, server has poor connection?
    thankx. all the best.

    dear friend ,
    ADF mean it is a framework(Application development framework). which is developed for java developers. earlier in oracle jdeveloper 10g used for development.now jdeveloper 11g has this feature.which is same to oracle forms,but it hasn't rports.it has jsf page(java sever face).jsp mean java server page. in adf both include but jsp is in jspx.java serve page xml.
    read these lines:-
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_58/jdtut_11r2_58_1.html
    http://www.oracle.com/technetwork/developer-tools/jdev/overview/index-100269.html
    http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/june2012-otn-harvest-1683085.pdf

Maybe you are looking for

  • Oracle.jbo.domain.Number to int and back

    I have a database field that comes back as a oracle.jbo.domain.Number. I want to increment this by one so was trying to convert it to an int, apply the increment then turn it back into a number. 2 questions : 1) Can I increment oracle.jbo.domain.Numb

  • ORA-27054: NFS file system where the file is created or resides is not moun

    Linux Red Hat 4 10.2.0.4 Had this issue since someone unplugged the san on Monday, and the servers were rebooted. Trying to do a duplpicate to Reporting Server from Production. The error returned, once the backupsets are being copied, is ORA-27054: N

  • Images Blurry on Printed Documentation Output

    Hello everyone, With my current project, consisting of several linked Word documents, when I generate a printed documentation output the images (pdf or word) within the document are extremely blurry. The images are embedded within the Word docs, then

  • The new Flash Player won't install?

    I have tried installing Flash Player XI several times. The download seems to go well and finishes. However, when I try to view video, a screen always pops up saying I need to install the new Flash Player. I have Windows 7 with IE 10. Can anyone help?

  • Maya 2015 playback glitches on Macbook pro 15"

    To whom it may concern, i've bought recently a macbook pro 15" retina. I'm using Maya 2015 by Autodesk as my principal workstation and I noticing like losing a lot of frames during the playback, like glithces. How can I solve this problem? I having t