locked
Wrong Notification when joining Multiple Tables RRS feed

  • Question

  • as a developer using visual studio .net 2005 ,I got confused about sth in notification services in SQL-Server 2005.When I want to keep informed updates in one of the fields of one row in one table I use this command.

    "select dbo.TableName.FieldName from dbo.Table" in SQLDependency constructor.It is working fine and I can get the notification from my code..But when I try it for multiple tables fields use this command

    "select dbo.Table1.fieldName1,dbo.Table2.fieldName1 from dbo.Table1 inner join  dbo.Table2   on dbo.Table1.fieldName2 = dbo.Table2.fieldName2" in SQL Dependency constructor. I this command means "You must keep me informed when Table1.fieldName1 is updated or Table2.fieldName1 is updated" all right??

    But I always get notification when the other fields of the Table1 or Table2 changes ,too..

    What is the problem?? 

    Tuesday, August 22, 2006 7:13 AM

All replies

  • Dispite the similar and somewhat ambiguous names, Query Notifications / SQLDependency and SQL Server Notification Services are not the same. You'll probably have better luck getting replies if you post to another forum/group.

     

    Wednesday, October 4, 2006 4:07 PM
  • Others and I have found that no matter what query you give the SQLDependency class, all changes to the table will give a  notification. I've never gotten the SQLDependency class to do what it says it should
    Sunday, March 25, 2007 4:26 AM