Click here to Skip to main content
16,019,618 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C\Hello< i'm working on C# and Mysql.
I want to sync DataGridView in my application with specific table in Mysql Database
in Microsoft SQLServer there was 'Sqldependency' is there something like that in my sql?
i want to monitor changes in my sql


What I have tried:

is the only to do that is creating a timer and execute the query repeatly?
Posted
Updated 7-Jan-18 1:14am

There's a MySqlDependency[^] class, but it needs to install dbExpress driver for MySQL[^] (payable).

I've found it on Devart forum: Database Monitoring[^]
 
Share this answer
 
v3
There is no equivalent service in MySql.

In order to make something like this work, you would have to write a server-side application that handles client connections and tracks them, and handles all SQL operations for your client applications, notifying the connected clients of any successful insert/delete/update operations.

The client applications would have to receive the notification from the server and update themselves accordingly.

Keep in mind, this is a pain in the ass to code, maintain, and support. There's a reason why you don't see this very often in mainstream applications.
 
Share this answer
 
Comments
Maciej Los 7-Jan-18 7:26am    
Seems, there's equivalent service for MySQL... See my answer.
Dave Kreskowiak 7-Jan-18 10:37am    
Hmmm... It seems the community for MySQL doesn't know about it either. I couldn't find a mention of it, but then again, I didn't spend a ton of time looking for it because I've got stuff to do too.
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900