Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Independent Application 2

Status
Not open for further replies.

Boris10

IS-IT--Management
Jan 26, 2012
97
KE
Hi every one. I am trying to develop a simple independent application using vb, which requires little user intput and runs independently and continuously after the user set the settings. All i want to do is periodically run operations on the database, depending on setting provided by the users.

Thank you for any input
 
Hi Tyson,i am looking for non event driven application. The user is supposed to provide period intervals for the app:

Example: perform DB operations every day, week etc, just like SQL agents do - u set the time interval and then leave it to do its job.

Thereafter, the system must perform exactly the same operation periodically. Therefore, i guess it must always be running to check for the date. Not sure, Any ideas.
 
Maybe create a DTS package from VB based on the input? That would be MS SQL.
 
I've done this sort of thing before.

Usually, I make a VB app with startup set to Sub Main. I program the app to do the thing just once. Then I configure windows task scheduler to call the app.

With Windows task scheduler, all of the timing things are built-in for you. Additionally, you don't need to worry about someone closing the app which would prevent future executions.

Of course, before performing the action, I always double check that the configuration is set up properly. For example, you'll need connection string parameters and such. In my apps, these configuration options are stored in a file. If you are going to store the connection string, and that connection string uses a password, you may want to encrypt the file.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
One thing about using the Windows schedular as mentioned, unless I set it up wrong when I did it, is when the password is changed you need to change it there too.
 
That's true about the password. I usually create a login specifically for this purpose, just like I usually create a login for the SQL Server service(s). I make the password extremely long, random, and ugly. I then set the password to never expire. Never had a problem since I started doing that.

Just make sure the login name is something descriptive, like "SqlServerStartupService".

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Yasis you guys just made my day!!!! I am going to Try it out Now!!!!. Thank you so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top