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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run VB code on timed intervals.

Status
Not open for further replies.

Eldaria

Programmer
Sep 20, 2001
123
NL
Is there any way in SQL server to run a piece of VB code on timed intervals?

The reason for this is that I want to make a Procedure that imports some logfiles every xx amount of minutes.

Regards.
Brian.
Eldaria

That was my 25cent** of opinion.

** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.
 
I would suggest making a DTS package and then scheduling it to run every X number of minutes.
 
You can run the VB code straight from the Job without requiring a package. Keep in mind that the Job, in either case, runs with its own credentials on teh SQLAgent account. If the VB code displays an error message or prompts for user input, it will hang because it has no console or window interface. If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
It really depends on what you mean as "VB Code". If you have an existing app written in VB, you can do as tlbroadbent suggested and run it as a job in SQL Server Agent or you could run it using the Windows Scheduler.

If your reference to "VB Code" is actually to write some "VBScript code" (the two are different) saved somewhere in SQL Server and have it run then DTS is what you are probably looking for.

"VBScript Code" can also be saved to an OS file and run from both SQL Server Agent or Windows Scheduler.
 
Thank you guys,

I compiled the VB code to an Executable, that I use the Windows Scheduler to run.

/Brian

Eldaria

That was my 25cent** of opinion.

** Inclusive Intrest, tax on interest, Genral tax, Enviromental tax, Tax, and tax on intrest, tax on fees, tax on tax, and other Various taxes and fees.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top