Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Enabling notification for individual tables
Enabling notification for individual tables
✍: Guest
Once the necessary stored procedure and tables are created then we have to notify saying
which table needs to be enabled for notifications.
That can be achieved by two ways:-
ã aspnet_regsql -et -E -d Northwind -t Products
ã Exec spNet_SqlCacheRegisterTableStoredProcedure 'TableName'
Registering tables for notification internally creates triggerfor the tables. For instance for
a “products” table the following trigger is created. So any modifications done to the
“Products” table will update the “AspNet_SqlCacheNotification’ table.
CREATE TRIGGER dbo.[Products_AspNet_SqlCacheNotification_Trigger] ON [Products] FOR INSERT, UPDATE, DELETE AS BEGIN SET NOCOUNT ON EXEC dbo.AspNet_SqlCacheUpdateChangeIdStoredProcedure N'Products‘ END
“AspNet_SqlCacheTablesForChangeNotification” contains a single record for every table
you're monitoring. When you make a change in the table (such as inserting, deleting or
updating a record), the change Id column is incremented by 1.ASP.NET queries this table
repeatedly keeps track of the most recent changed values for every table. When this
value changes in a subsequent read, ASP.NET knows that the table has changed.
2007-10-23, 4733👍, 0💬
Popular Posts:
Can a variable be both const and volatile? Yes. The const modifier means that this code cannot chang...
Can JavaScript steal text from your clipboard? It is true, text you last copied for pasting (copy &a...
What are the core functionalities in XML .NET framework? Can you explain in detail those functionali...
What's the difference between J2SDK 1.5 and J2SDK 5.0? There is no difference, Sun Microsystems just...
How can I implement a thread-safe JSP page? You can make your JSPs thread-safe by having them implem...