Architecture to build an application to extract data from database and write to a file. Application should be schedulable

Viewed 59

We need to upgrade a current Windows application that extracts data from a remote Oracle database and writes it to a text file on the local disk. This application will be scheduled to run at specific time. Right now we have a Windows forms application with config file and using ADO.net and direct sql statements in the code first built using VS 2005. What is the optimal upgrade path given we have Visual Studio 2015 and Windows server 2016. Can this be accomplished using other than Windows form Application? Thankyou!

1 Answers

One way to do this would be to try to move the logic to a console application and then use the Windows Task Scheduler.

You could also use a Windows Service for this: Windows Service to run a function at specified time

Personally, I think that the Windows Task Scheduler with a console application would likely be easier. (That's just my opinion, though).

Otherwise, you could use UI Automation for this, but it would be a little annoying. (There are other ways of doing this kind of automation that can be found on Google; I suggest searching on "how to automate a Windows Forms application" if you'd prefer to use a different way to do this).

A couple other references:

how to automate some actions on Windows form Application?

How to Automate simple Windows Form Application using MSAA?

Related