Initializes a new instance of the SqlCacheDependency class. It supports the use of 'Stored Procedures'.

Namespace: Alachisoft.NCache.Runtime.Dependencies
Assembly: Alachisoft.NCache.Runtime (in Alachisoft.NCache.Runtime.dll) Version: 4.1.0.0 (4.1.0.0)

Syntax

C#
public SqlCacheDependency(
	string connectionString,
	string cmdText,
	SqlCommandType cmdType,
	Dictionary<string, SqlCmdParams> cmdParams
)
Visual Basic
Public Sub New ( _
	connectionString As String, _
	cmdText As String, _
	cmdType As SqlCommandType, _
	cmdParams As Dictionary(Of String, SqlCmdParams) _
)
Visual C++
public:
SqlCacheDependency(
	String^ connectionString, 
	String^ cmdText, 
	SqlCommandType cmdType, 
	Dictionary<String^, SqlCmdParams^>^ cmdParams
)

Parameters

connectionString
Type: System..::..String
connection string to be used by dependency.
cmdText
Type: System..::..String
cmdText to be used by dependency.
cmdType
Type: Alachisoft.NCache.Runtime.Dependencies..::..SqlCommandType
The type of the command. (text/stored procedure)
cmdParams
Type: System.Collections.Generic..::..Dictionary<(Of <(<'String, SqlCmdParams>)>)>
Parameters to be passed to the command.

Return Value

A SqlCacheDependency object based on the supplied parameters.

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: Fully qualified table names, including the name of the table owner. For example, to refer to a table called "customers" that is owned by the database owner, the SQL statement must refer to "dbo.customers". Explicit column names in the Select statement. You cannot use the asterisk (*) wildcard character to select all columns from a table. For example, instead of "select * from customers", you must use "select name, address, city, state from dbo.customers".

See Also