Solved

trigger a notification

Posted on 2006-07-18
4
223 Views
Last Modified: 2010-04-23
Hi, i have a server in vb.net which will monitors a process, once the process is done it will write to the database whether the process is done or not.  Currently we are doing this at the client side, get the client to poll the database table to check the status in an infinite loop and update the client's UI to indicate that processing at server side is done. Are there better ways of polling data to check on a status besides reading the database every loop which my manager dont really like. Maybe some form of auto trigger from the sql server or things like this?
0
Comment
Question by:jaxrpc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 8

Accepted Solution

by:
Shakti109 earned 500 total points
ID: 17129717

When you say "update the clients UI...", what are you doing?

You CAN put a trigger on this table (on insert) that would take some action after a record was inserted. You could have it look at the items just inserted and if they meet the criteria then do something.

An example of an "on insert" trigger (for sql) is as follows :


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER TRIGGER [NotifyClientTrigger]
   ON  [dbo].[ProcessWatchTable]
   AFTER INSERT
AS
BEGIN
      -- SET NOCOUNT ON added to prevent extra result sets from
      -- interfering with SELECT statements.
      SET NOCOUNT ON;
  DECLARE @Process_Name varchar(20);
  DECLARE @Process_Running int ;

  select
  @Process_Name,
  @Process_Running
  from inserted

     if  
         @Process_Running = 1
        -- Take some action
   
END
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access/Visual Basic Question 3 47
Asp.Net Session Question 2 44
VB.net VSTO Excel Ribbon error 4 24
I need to clear List Box in MVVM panel. 15 24
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question