Rather than poll against some tables, I'd like to signal a waiting c# app that there are new rows to be processed in a table, maybe via a trigger. Is there some way for the database to signal to a console app, or am I stuck polling the table looking for new rows?
An alternating current is produced by switching the potential between two terminals in a fixed time interval—the frequency. The difference in potential between the positive and negative terminal is expressed in volts.
An AC signal is a current, voltage, or numerical sequence that consistently exhibits both positive and negative values, and a DC signal exhibits only positive values or only negative values. The following plots provide examples of AC and DC signals.
AC means Alternating Current and DC means Direct Current. AC and DC are also used when referring to voltages and electrical signals which are not currents! For example: a 12V AC power supply has an alternating voltage (which will make an alternating current flow).
Alternating current (AC), is an electric current in which the flow of electric charge periodically reverses direction, whereas in direct current (DC, also dc), the flow of electric charge is only in one direction.
Take a look at Query Notifications (SQL Server 2005+).
Microsoft SQL Server 2005 introduces query notifications, new functionality that allows an application to request a notification from SQL Server when the results of a query change. Query notifications allow programmers to design applications that query the database only when there is a change to information that the application has previously retrieved.
There is an example here of how to write a simple form app to register a query for notification: http://msdn.microsoft.com/en-us/library/a52dhwx7(VS.80).aspx.
This does require the Service Broker to be enabled on the database.
You should take a look at the notes in the Remarks section of the MSDN SqlDependency documentation to make sure it is the right choice for your scenario
Check if SqlCacheDependency can be of any use...
http://www.asp.net/data-access/tutorials/using-sql-cache-dependencies-cs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With