04 2011 档案
摘要:SqlDependency提供了:对监测的数据库发生变化通知前台程序的功能。具体使用如下: public Form1() { InitializeComponent(); SqlDependency.Start(conStr); NewMethod(); } string conStr = "data source=.;initial catalog=AssetsManageDB;uid=sa;pwd=****"; private void NewMethod() { using (SqlConnection con = new SqlConnection(conStr))
阅读全文