The caching mechanism in ASP.NET 2.0 has been extended (very logically) to include SQL cache invalidation. If you have SQL 2005 then your are ready to go, however if you are using SQL 7 or SQL 2000 then a bit of configuration is in order.
Step one must be executed for each database and step two must be executed for each table. Execute these commands from the Visual Studio.NET 2005 command line.
1. Activate the database. If you are using SQL security use A, if you are using Windows security use B.
A. aspnet_regsql.exe -S server -U user -P password -d database -ed
B. aspnet_regsql.exe -S server -E -d database -ed
2. Activate the table. If you are using SQL security use A, if you are using Windows security use B.
A. aspnet_regsql.exe -S server -U user -P password -d database -t table -et
B. aspnet_regsql.exe -S server -E -d database -t table -et
That's it. You should be ready to rolll. In the next post I will show you what you need to do in ASP.NET to make this work for you.