Sora
Sora

Reputation: 2551

Get database record automatically at a specific time

I have a task that basically I don't know how to accomplish it and I want some advice from you guys : I have a database that contains many binary images and a website that has a button.

When I press it a select statement is executed to search all the newly inserted rows after a specific date and send it to the website to process. My boss asked me if there is any way I can do that process manually by using a web service or anything else like a trigger in the database that automatically searches for new rows after a specific date and sends the new rows to the web site.

I don't know if I explained what I need. My main question is it possible to do this and what is the best way to achieve it. one more thing if it is achievable can I trigger it to work every day at a specific time ? Thank you

Upvotes: 0

Views: 306

Answers (3)

Sagar Patil
Sagar Patil

Reputation: 21

Use Cursor and Trigger but u have to store date in database which u want display on particular date

Upvotes: 0

user1429080
user1429080

Reputation: 9166

As I understood you question, these are the requirements:

  • You need to automate the process that is now manually triggered by clicking the button on the web page

The simplest way to do this in my opinion would be to create a small Console application and install it on a suitable server. Then on the server create a Windows task scheduler (Google it unless you're already familiar with it) task that runs the console application on a suitable schedule.

You could for instance have it run once every night at say 10 minutes past midnight and it would fetch all images from the past day and "send them to be processed".

Upvotes: 1

Nitin Agrawal
Nitin Agrawal

Reputation: 1361

First of all you have to understand website is not a repository of records but it works based on user requests. So in your website if you want to change contents on web pages, try AJAX reqeusts. If you are looking for some options to update details in other systems periodically think of eitehr Windows services, or cron jobs or may be SSIS jobs etc.

Upvotes: 0

Related Questions