0

EDIT AFTER BEING MARKED AS DUPLICATE:

How This Question Is Different From Previously Asked Question No offense , correct me if i am wrong i will simply delete this question if it is a duplicate :)

I have followed MSDN SqlDenpendancy article but is constantly checking for change in record.. making the application too slow

I can email complete application with database backup if someone needs it..

Thanks a lot

BACKGROUND:
I don't it is called that I want to achieve. I can only explain what I want to achieve. Both answers are appreciated either to let me know the name of the task that I want to achieve, what it is called so I can Google It efficiently or if you can tell me the solution of the task that I want to achieve step by step.

I am currently not that good in programming either.

Image To Understand The Task

TASK:

What I want to achieve is a functionality in which both/multiple users have a same C# application from that they are making data transactions from a same database and once a record is updated in the database from any computer now it should automatically updated in the second/all the computers.

EXPLANATION WITH EXAMPLE:

In database I have a table CUSTOMERS. In application on a single form, I have a data grid view that shows all customers and text columns with a button to add new customers.

Now if we think programmatically, if user adds a customer from COMPUTER ‘’1’’ After the code of adding data I will just have to refresh grid view in code by again calling the stored procedure from database that gets all customers for me so now the user of COMPUTER ‘’1’’ can see which all customers

But at the moment user from COMPUTER “2” cannot see the change in his/her data grid view until unless he/she adds a new record himself/herself..

WAYS I DON'T WANT TO ACHIEVE THIS TASK

I can do I by refreshing the grid view in application code every 5 - 10 seconds or but that would make the application run slower an ineffectively because all the load is on client's computer.

SOLUTION THAT I CAN THINK OF:

I can write a trigger that fires whenever a table uploads.. now I need to somehow know in the C# code that the trigger was fired without constantly checking for it because it is making the app too slow

Sheraz Ahmed
  • 405
  • 1
  • 4
  • 20
  • 1
    Tons of questions already answered that, don't be lazy and search first. – Gusman Feb 28 '16 at 12:46
  • On top: What you WANT is irrelevant - if it is impossible. SQL Server is not an application server. You want intelligent comm from the server to applications, write an application server that all data passes through. You try to fix an architectural problem with a technology that is not designed for this. – TomTom Feb 28 '16 at 13:05
  • The question is still duplicate the fact you dont like the way `SqlDenpendancy` works dont make it a different question. But maybe you can write some service in node-js to update your service to update your page, – Juan Carlos Oropeza Feb 28 '16 at 14:20
  • @JuanCarlosOropeza node-js ? what ? but this is a desktop application.... we are talking about.. – Sheraz Ahmed Feb 28 '16 at 15:22
  • I mean you can create a webservice using node-js and push notifications to your control. – Juan Carlos Oropeza Feb 28 '16 at 17:38
  • @JuanCarlosOropeza okaay i've never written a hello world in node-js I am gonna study that now – Sheraz Ahmed Feb 29 '16 at 04:35

0 Answers0