如何从数据库到C#应用程序获取修改记录 [英] How to get modified record from database to C# application

查看:54
本文介绍了如何从数据库到C#应用程序获取修改记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我正在使用sql通知和sqldependency开发c#应用程序。

如果特定记录在sql server的数据库表中更新,我想要在c#应用程序中获取记录详细信息



但现在如果一条记录更新,我将弹出所有记录



请帮帮我。



谢谢和问候

N.Ramachandran



我尝试了什么:



如果使用sqlnotification

解决数据库中的任何更改,则在c#中填充数据方案

您好,

您可以使用触发器获取记录的更新详细信息。

您也可以在sql server中使用范围标识。

您好Ramachandran,



据我所知,您只希望在插入,更新或删除时将修改后的记录发送到您的C#应用​​程序执行。



看看CodePlex项目这里的SqlTableDependency:审核,监控和接收SQL Server表更改通知 - 主页 [ ^ ]



SqlTableDependency似乎能够完全满足你的需求。



问候,

Mark


Hi
I am developing c# application with sql notification and sqldependency.
if particular record is updated in database table in sql server,I want to get that record details in c# application

but now i am getting all records popup if one record is updated

Please help me .

Thanks and regards
N.Ramachandran

What I have tried:

populate data in c# if any change in database using sqlnotification

解决方案

Hi,
You can use trigger for getting update details of record.
You can also use scope identity in sql server.


Hi Ramachandran,

As I understand, you only want the modified record sent to your C# application when an insert, update, or delete is performed.

Take a look at the CodePlex project SqlTableDependency here: Audit, monitor and receive SQL Server table change notifications - Home[^]

SqlTableDependency seems to be able to do exactly what you require.

Regards,
Mark


这篇关于如何从数据库到C#应用程序获取修改记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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