I have a windows form application that is displaying a relatively huge table. I want to refresh my table only if there is an insert, delete or update operation applied.
The data that is being inserted, deleted or updated is not being done within my own application, and is rarely happening. Refreshing my table periodically slows down my application.
In this situation what is the most efficient way to refresh my datagrid records ?
答案 0 :(得分:2)
在我提供的那个问题中读了一下,有一节讨论SQL依赖关系和查询通知。我会看到The SQL Dependency object并将其连接起来,以便每当插入/更新/删除操作发生时,您的应用程序都会得到通知,并且数据会在您的网格,内存绑定列表等中刷新。