Constructor SqlCacheDependency
SqlCacheDependency(String, String)
Initializes a new instance of the SqlCacheDependency class, using the supplied connection string and query string.
Declaration
public SqlCacheDependency(string connectionString, string cmdText)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | connection string to be used by dependency. |
System.String | cmdText | cmdText to be used by dependency. |
Remarks
This constructor is used to create SqlCacheDependency objects that use the query-notification feature of SQL Server 2005 products.
SQL query must include the following:
SqlCacheDependency(String, String, SqlCommandType, Dictionary<String, SqlCmdParams>)
Initializes a new instance of the SqlCacheDependency class. It supports the use of 'Stored Procedures'.
Declaration
public SqlCacheDependency(string connectionString, string cmdText, SqlCommandType cmdType, Dictionary<string, SqlCmdParams> cmdParams)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionString | connection string to be used by dependency. |
System.String | cmdText | cmdText to be used by dependency. |
SqlCommandType | cmdType | The type of the command. (text/stored procedure) |
System.Collections.Generic.Dictionary<System.String, SqlCmdParams> | cmdParams | Parameters to be passed to the command. |
Remarks
This constructor is used to create SqlCacheDependency objects that use the query-notification feature of SQL Server 2005 products.
SQL query must include the following: