KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to get the SqlDependency object to give me notifications, but so far I'm not able to get it working. the sql query that I'm sending is this: SELECT [SocialMedia].[dbo].[Items].[Id] FROM [SocialMedia].[dbo].[Items] I've tried it w/ and w/o the braces, having the fully qualified name, having only the variable name, and everything inbetween. Id is of type Guid which I didn't see any mention that they didn't work with SqlDependency objects in the Creating a Query for Notification article I've also tried sending multiple columns over to see if that would work. SELECT SocialMedia.dbo.Items.Id, SocialMedia.dbo.Items.DateTimeCreated, SocialMedia.dbo.Items.AuthorId FROM SocialMedia.dbo.Items And that also didn't work. Here is my table SQL: USE [SocialMedia] SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON SET ANSI_PADDING ON CREATE TABLE [dbo].[Items]( [Id] [uniqueidentifier] NOT NULL, [DateTimeCreated] [datetimeoffset](7) NOT NULL, [AuthorId] [uniqueidentifier] NOT NULL, [Source] [varchar](max) NOT NULL, [PlaceId] [uniqueidentifier] NULL, [FullText] [varchar](max) NOT NULL, [Geography] [geography] NULL, [DateTimeAdded] [datetime] NULL, CONSTRAINT [PK_Items] PRIMARY KEY CLUSTERED ( [Id] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ALTER TABLE [dbo].[Items] WITH CHECK ADD CONSTRAINT [FK_Items_Places] FOREIGN KEY([PlaceId]) REFERENCES [dbo].[Places] ([Id]) ALTER TABLE [dbo].[Items] CHECK CONSTRAINT [FK_Items_Places] GO ALTER TABLE [dbo].[Items] WITH CHECK ADD CONSTRAINT [FK_Items_Users] FOREI
Tags (comma-separated)
Save Edits
Cancel