Solved

trigger a notification

Posted on 2006-07-18
4
224 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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