asp.net.ph

SqlDataSource.SqlCacheDependency Property

System.Web.UI.WebControls Namespace   SqlDataSource Class


.NET Framework version 2.0

Sets or retrieves a semicolon-delimited string that indicates which databases and tables to use for the Microsoft SQL Server cache dependency.

Syntax


Inline <asp:SqlDataSource sqlcachedependency = strValues ... >
Script SqlDataSource.SqlCacheDependency [ = strValues ]

Property Value


strValues A string that indicates which databases and tables to use for the SQL Server cache dependency.

The property is read/write with no default value.

Remarks

The SqlDataSource control supports an optional expiration policy based on the SqlCacheDependency object for the data cache ( the service must be configured for the database server).

The SqlCacheDependency string identifies databases and tables according to the same format that is used by the @ Page directive, where the first part of the string is a connection string to a Microsoft SQL Server database, followed by a colon delimiter, and finally the name of the database table ( for example, "connectionstring1:table1"). If the SqlCacheDependency property depends on more than one table, the connection string-and-table name pairs are separated by semicolons ( for example, "connectionstring1:table1";connectionstring2:table2").

NOTE: When you are using client impersonation under Microsoft Windows authentication, the data is cached when the first user accesses the data. If another user requests the same data, the data is retrieved from the cache. The data is not retrieved by making another call to the database to verify the user's access to the data. If you expect more than one user to access the data, and you want each retrieval to the data to be verified by the security configurations for the database, do not use caching.

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph