mysql中的Sqldependency [英] Sqldependency in mysql

查看:786
本文介绍了mysql中的Sqldependency的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的C\Hello<我正在研究C#和Mysql。

我想在我的应用程序中将DataGridView与Mysql数据库中的特定表同步

在Microsoft SQLServer中有'Sqldependency'有什么东西就像在我的sql中那样?

i想监视我的sql中的变化




我尝试过的:



唯一要做的就是创建一个计时器并重复执行查询?

解决方案

< blockquote> MySql中没有等效的服务。



为了做这样的工作,你必须编写一个处理客户端连接的服务器端应用程序跟踪它们,并处理客户端应用程序的所有SQL操作,通知连接的客户端任何成功的插入/删除/更新操作。



客户端应用程序必须接收来自服务器的通知并相应地更新自己。



保持最小值d,这是代码,维护和支持的痛苦。有一个原因,你不会在主流应用程序中经常看到这一点。


有一个 MySqlDependency [ ^ ]类,但需要安装用于MySQL的dbExpress驱动程序 [ ^ ](应付)。



我在 Devart论坛:数据库监控 [ ^ ]


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?

解决方案

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.


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

I've found it on Devart forum: Database Monitoring[^]


这篇关于mysql中的Sqldependency的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆