Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8921775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:38:43+00:00 2026-06-15T06:38:43+00:00

In a VB.net application I have a SQL interface, I have a users table

  • 0

In a VB.net application I have a SQL interface, I have a users table in the SQL database for users of this application, all of them see the same data now when a user clicks a button changes are saved in the sql and data is refreshed for that user, however I want the data to be refreshed for all users as soon as some user clicks that button.

Ideas I have

  1. refreshing data every second, which is not good
  2. SQL trigger to vb.net which I need more clarification about!

What would be the most effective way?

i would like a work around without timers!

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:38:45+00:00Added an answer on June 15, 2026 at 6:38 am

    SQL Server Notification Services

    SQL provides subscription for notifications that provide mechanisms related to your requirements.

    http://msdn.microsoft.com/en-us/library/ms172483(v=sql.90).aspx

    Note: removed since you later provided info you’re using SQL Server 2008 R2

    Old trick with System.IO.FileSystemWatcher

    The other way is to create a SQL trigger on your table that does a simple file timestamp change. File itself is 0 bytes in size so we’re not writing anything to it, making it a fast operation.

    All clients then watch this file for modifications and when it happens watcher triggers a change event in which your clients would simply reload their data.

    CREATE TRIGGER DataChanged
    ON YourTable
    FOR INSERT, UPDATE, DELETE
    AS
        EXEC master..xsp_UpdateSignalFile 'YourTable.DataChanged'
    

    The idea of this CLR stored procedure is to be as fast as possible to keep it scalable. IN case of heavy load data server this could likely be even optimised by using external processes to update file…

    You can find the code for the CLR stored procedure in this MSDN article that is actually related to web forms, but you don’t need other things than this CLR procedure. And maybe the explanation of how the whole system works.

    Your clients would then be using System.IO.FileSystemWatcher to watch for file changes on some network location (where the procedure would be updating files) and update their data when change happens.

    Simple and elegant trick that doesn’t use polling or unnecessary requests to the data server. You can of course have triggers on several tables each changing a different file and depending on the form you’re displaying on the client you’d then watch that particular file for the lifetime of the form. When user changes context to a different data your client app releases file watcher (and creates a new one of needed for a different file).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database on SQL Server 2008. I have an ASP.NET application that
Im using c# .net windows form application. i have a SQL database with 5
I have a C#.NET desktop application using SQL Compact edition as data store. The
I have an ASP.NET MVC application that uses Linq to SQL repositories for all
I have an ASP.NET MVC 3 (.NET 4) web application. This app fetches data
I have an ASP.NET application running on multiple IIS6 web servers, with a SQL
I have an asp.net web application written in C# using a SQL Server 2008
I have an ASP.Net MVC application and I'm using Forms authentication in SQL Server.
I have a desktop application (C# .NET 3.5) that uses a SQL server for
Im using c# .net windows form application. I have many databases created using sql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.