PC Review


Reply
Thread Tools Rate Thread

creating window service in c#

 
 
raju akula via DotNetMonster.com
Guest
Posts: n/a
 
      23rd Mar 2005
hi,

I have two databases named abc and xyz.

I have to run a job everyday 9 p.m.
first I have to check the abc database tables, that if
anybody registered a compound in
the table within 24hrs of the job running.(like if my
job executes today 9 p.m.
then the abc database tables should be checked for
previous 24 hrs.)
Then if I find any compounds registered in the
previous 24hrs in the abc database,
I should update my xyz database tables.

Compounds which are registered
before the time period should be skipped(means if they
are registered more than 24 hrs previously,
those compounds should be skipped).


I need example with two assumed tables each in the
corresponding databases abc and xyz.

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
 
Peter Bromberg [MVP]
Guest
Posts: n/a
 
      23rd Mar 2005
I doubt that you will get many takers willing to write all this code for
you, but the easiest way is not to create a windows service. Just write up
your busines logic as a console app and have Task Scheduler run it for you
at the appropriate schedule.
Less resource use than having a service running that only needs to run 1X a
day.
Peter

"raju akula via DotNetMonster.com" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> hi,
>
> I have two databases named abc and xyz.
>
> I have to run a job everyday 9 p.m.
> first I have to check the abc database tables, that if
> anybody registered a compound in
> the table within 24hrs of the job running.(like if my
> job executes today 9 p.m.
> then the abc database tables should be checked for
> previous 24 hrs.)
> Then if I find any compounds registered in the
> previous 24hrs in the abc database,
> I should update my xyz database tables.
>
> Compounds which are registered
> before the time period should be skipped(means if they
> are registered more than 24 hrs previously,
> those compounds should be skipped).
>
>
> I need example with two assumed tables each in the
> corresponding databases abc and xyz.
>
> --
> Message posted via http://www.dotnetmonster.com



 
Reply With Quote
 
Brian
Guest
Posts: n/a
 
      23rd Mar 2005
I might point out that, this approach assumes that the application / service
will run perfectly without error. This is a poor assumption. Keep that
in mind. I've written a few services that work on the concepts you've presented,
and you need to have a way for it to know where it left off. (In case the
power goes out and it doesn't run for 3 days, it *usually* needs to go back
and pick up the data from 3 days ago)

--Brian



> I doubt that you will get many takers willing to write all this code
> for
> you, but the easiest way is not to create a windows service. Just
> write up
> your busines logic as a console app and have Task Scheduler run it for
> you
> at the appropriate schedule.
> Less resource use than having a service running that only needs to run
> 1X a
> day.
> Peter
> "raju akula via DotNetMonster.com" <(E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
>
>> hi,
>>
>> I have two databases named abc and xyz.
>>
>> I have to run a job everyday 9 p.m.
>> first I have to check the abc database tables, that if
>> anybody registered a compound in
>> the table within 24hrs of the job running.(like if my
>> job executes today 9 p.m.
>> then the abc database tables should be checked for
>> previous 24 hrs.)
>> Then if I find any compounds registered in the
>> previous 24hrs in the abc database,
>> I should update my xyz database tables.
>> Compounds which are registered
>> before the time period should be skipped(means if they
>> are registered more than 24 hrs previously,
>> those compounds should be skipped).
>> I need example with two assumed tables each in the corresponding
>> databases abc and xyz.
>>
>> -- Message posted via http://www.dotnetmonster.com
>>




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
creating window service to synchronize local database toserver database sujatha k Microsoft C# .NET 5 1st Feb 2011 06:00 AM
Creating a Web Service (Service, not Client) from WSDL Bert Leu Microsoft VB .NET 3 24th Nov 2007 02:35 PM
Creating a Web Service (Service, not Client) from WSDL Bert Leu Microsoft ASP .NET 1 23rd Nov 2007 08:29 PM
Creating a window service TonyJ Microsoft C# .NET 3 12th Oct 2007 08:48 PM
Window.Opener Creating A Refresh In Parent Window Steve Wark Microsoft ASP .NET 3 28th Oct 2004 10:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:52 PM.