?
Solved

trigger a notification

Posted on 2006-07-18
4
Medium Priority
?
226 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 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month9 days, 12 hours left to enroll

762 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