locked
every 30 sec time update record using web services in .net RRS feed

  • Question

  • User96926133 posted

    Hi ,

    Every 30 sec add new record in a table <DB> using webservice in .net application.

    Thanks,

    Venkat 

    Thursday, February 21, 2013 7:57 AM

Answers

  • User-1662538993 posted

    Create a console app and web service.

    Console app will call web service and web service will add data to database.

    Schedule console app to run every 30 seconds.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 21, 2013 8:45 AM
  • User-742633084 posted

    Hi Venkat,

    I think the suggestion from kushalrdalal is quite reasonable. For the webservice, you only need to add database query/access code in it (using ADO.NET Entity Framework + LINQ or raw ADO.NET)...

    Then, you can build a console app to invoke the webservice and put the control and workflow in the console app.

    Finally, you can use the task scheduler feature of windows operating system to execute the console app based on a regular time interval so that you do not need to implement the timer schedule system yourself.

    #Schedule a task
    http://windows.microsoft.com/en-US/windows7/Schedule-a-task

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 4, 2013 2:47 AM

All replies

  • User-1360095595 posted

    You must use a webservice?

    Thursday, February 21, 2013 8:00 AM
  • User96926133 posted

    Hi Metal,

    Ya, that webservice functionality only i want 

    example : from API i get some values these values pass database using webservice.

    Plz provide that code. it's very urgent ...

    Thanks,

    Venkat .

    Thursday, February 21, 2013 8:08 AM
  • User-1662538993 posted

    Create a console app and web service.

    Console app will call web service and web service will add data to database.

    Schedule console app to run every 30 seconds.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 21, 2013 8:45 AM
  • User-742633084 posted

    Hi Venkat,

    I think the suggestion from kushalrdalal is quite reasonable. For the webservice, you only need to add database query/access code in it (using ADO.NET Entity Framework + LINQ or raw ADO.NET)...

    Then, you can build a console app to invoke the webservice and put the control and workflow in the console app.

    Finally, you can use the task scheduler feature of windows operating system to execute the console app based on a regular time interval so that you do not need to implement the timer schedule system yourself.

    #Schedule a task
    http://windows.microsoft.com/en-US/windows7/Schedule-a-task

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 4, 2013 2:47 AM
  • User2120624532 posted

    Log on as administrator.
    Open Task Scheduler by either typing "task" into the Start Menu search bar, or by opening All Programs - Accessories - System Tools.


    Select 'Create Basic Task' from the right hand pane and the 'Create Basic Task Wizard will open.

    Type a 'Name' and 'Description'  for your new task and click Next

    Select when you would like the event/task to run and click next. I am selecting daily.

    Select exact time when you want to run the application and click next.

    Select action and click next. I am selecting here Start a program.

    Click ‘Browse’ and select the exe file form the  folder and click next.
    Click Finish.

    For shortage of time I am providing here basic steps.
    To see step by step please visit: http://cybarlab.blogspot.com/2013/03/run-c-sharp-console-application-using.html

    Monday, March 18, 2013 7:51 AM