What is SqlDependency? As the word describes itself, it is used to notify your application or user when certain criteria or condition is satisfied. This condition (query in technical terms) is provided to SQL notification service to be observed upon and ask to be notified when the condition is met or the data changes. In short the SqlDependency provides capabilities to your application to monitor your database for data change without the hassles of continuously querying the database using timers or loops. I will walk you through the simplest way to enable SqlDependency in your application. For the purpose of this example I am using SQL Server 2012 Express, it also works for other versions of SQL database like SQL 2008 and 2005. The part of SQL Server that make things happen: SQL Server – SQL Service Broker and Queues. SQL Service broker (Ref: MSDN) – It is a feature of SQL » Read more

 Jsinh        

TRAILER This may seems to be very hilarious to all ninja programmers but it possibly help starters and also save me the trouble to remember it !! MOTION PICTURE What would you do without a connection string when you wish to talk to a database from your application. Good practice – adding connection string in the app.config or web.config and use it wherever needed in application. This helps in changing connection string without changing (compiling or deploying) our code. How to define connection string: The configuration file has dedicated section for this purpose  called “connectionStrings”, where you can add multiple entries of connection strings you wish to configured for your application. The connection string element contains three elements: Name: Name for the connection string entry which can be used to reference that connection string. (Mandatory) ConnectionString: The connection string that contains the specification to make the connection to the underlying » Read more

 Jsinh