Partilhar via


Извещение об изменениях в результатах запроса (Query Notification)

?????? ?? ??, ???…

Query Notification ? SQL 2005 – ????? ????????????????, ??????????? ????????? ?????? ?? SQL Server ? ??????????? ????????? ????????? ? ??????, ???? ?????????? ????? ??????? ?????? ????????? ???????? ?? ??????????? ??????????. ??? ??????, ??? ???? ????????? ?????-?? ????????? ? ?????? ??????, ?????????? ? ??????, .NET ??? ????? ????????????? ???????.

???????, ?????????? ?? ?????? ????? ?????????? API(ADO.NET, OLE DB, ODBC, SOAP) ????? ????????? ???????? Notification, ??????? ??????? «????????» ?? ?????????? ?? ????????? ??????.

????????:

……………………………………………………………………………

SqlConnection c = new SqlConnection(…………………………);

SqlCommand cm = c.CreateCommand();

cm.CommandText = "Select id, time from dbo.t_table";

SqlString notifyId = "Notification_Id";

SqlString notifOpt = "service = service_name; local database = database_name";

int timeOut = 50000;

cm.Notification = new SqlNotificationRequest (notifyId.ToString(), notifOpt.ToString(), timeOut);

……………………………………………………………………………

??????, ???? ?????????, ???????????? ???????? Select id, time from dbo.t_table ?????????, ?????????? ??????? ?????????.

??? ?????????? ????? ???? ???????? ??????? ??? ??????????? ??????????? ??? web-?????????? ??????????.

????? ???????? (?? ?? ?????????? J) ????? ????????, ????????, ?????:

https://msdn2.microsoft.com/en-us/library/ms379594(VS.80).aspx