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

How Can I run a VB procedure whenever date changes on server 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I developed a client/server app that needs to calculate a result using data stored in several tables. It is too complicated to convert into stored procedure (at least not easily...).
I want to be able to run a VB procedure whenever SQL Server date changes into Start or End of quarter (also stored in a table), but I don't want to use timers in VB app.

If this is not possible, can anyone tell me is there a way to automatically run a stored procedure(assuming that I will be able to convert the code ...) when date changes (I know it can be run on SQL Server start-up, but that doesn't help me...)

Thanks a lot!
 
This is possible...

For a real-time response to the change, do the following:

1. Create an in-line, active-x object that performs your VB logic.
2. You will need to create a trigger on the table(s) that respond to the date change.
3. In the trigger, instantiate the object using sp_oacreate, and call the VB method using sp_oamethod...

Et... viola..



Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top