none
how to get alert when i login based on database record value change RRS feed

  • Question

  • Hi

    How to get notification/alert window,while working in application C#

    I want to get meeting schedule alert(particular logged in user if he has meeting) every one hour before the meeting.

    I am getting data from database.

      The  process is executed using 'exe' application using windows services

    but I do not know to  execute windows services and call the 'exe' application and make alert window

    Can you please help me to find the solution

    Thanks and Regards

    Ramachandran

    Saturday, January 6, 2018 10:02 AM

All replies

  • Hello,

    There is an initial setup required for doing this with SQL-Server via SqlDependency class. If using MS-Access, there is no support for this.

    Here is a code sample.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Saturday, January 6, 2018 10:20 AM
    Moderator
  • Hello chandran,

    I strongly suggest you don't launch a UI app from windows service. If you do you will meet "the UI window cannot be displayed" question whether you are using Porocess.Start or invoke command line or others. This is because the service process is not running inside a GUI so the application that launches won't launch inside of any interactively logged in user's window.

    >>but I do not know to  execute windows services and call the 'exe' application and make alert window

    As for a workaround, you could use a console application with no windows to replace windows service. You just need to set the application output type as "windows application" in you project properties. and then use Process class to run exe application. The following is a simple example.

     static void Main(string[] args)
            {
                while (true) {
                    string path = @"xxx.exe";
                    Process.Start(path);
                    Thread.Sleep(5000);
                }
    }

    Best regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 8, 2018 8:34 AM
    Moderator
  • Hello Ramachandran,

    Is there any update or any other assistance I could provide? You could mark the helpful reply as answer if the issue has been solved. And if you have any concerns, please do not hesitate to let us know.

    Thank you for your understanding and cooperation.

    Best regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Sunday, January 28, 2018 12:41 PM
    Moderator