Change Notification Demo does not work

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
spearsp
Posts: 2
Joined: Mon 16 Dec 2013 13:09

Change Notification Demo does not work

Post by spearsp » Mon 16 Dec 2013 13:26

I am currently evaluating SDAC with a view to replacing ADO. One of the key selling points is the change notification, for which there is a demo in the trial download. However, the demo does not work. It runs fine, opens both connections to the database, but no change notifications are coming through. When I try to close the main query (the one with the TMSChangeNotification on it), it gives me two errors: First "Operation Cancelled" and then

Project SDACDemo.exe raised exception class EOLEDBError with message 'OLE DB error occurred. Code 80040E4Eh'.

which may be related. I am using BDS 2006 on Windows 8, with the latest version of the SQL Server Native Client on my workstation and SQL Server 2008R2 (10.50.2550) on the server. I have tested it on my local installation of SQL Express (10.50.4000), yielding the same results. I have searched the forum for similar issues, but have not found anything addressing this. Any help would be appreciated.

Thanks,
Peter

AndreyZ

Re: Change Notification Demo does not work

Post by AndreyZ » Mon 16 Dec 2013 14:22

To make notifications work, you should use the following properties:

Code: Select all

SET ANSI_NULLS ON
GO
SET ANSI_PADDING ON
GO
SET ANSI_WARNINGS ON
GO
SET CONCAT_NULL_YIELDS_NULL ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET NUMERIC_ROUNDABORT OFF
GO
SET ARITHABORT ON
GO
Also, make sure service broker is enabled on the server. You can enable it using the following SQL statement:

Code: Select all

ALTER DATABASE databasename SET ENABLE_BROKER
Two errors you receive when working with notifications occur only if you run your application from IDE. You will not see these errors when you run the executable file of your application.

spearsp
Posts: 2
Joined: Mon 16 Dec 2013 13:09

Re: Change Notification Demo does not work

Post by spearsp » Mon 16 Dec 2013 14:31

That fixed the problem. Thank you.

AndreyZ

Re: Change Notification Demo does not work

Post by AndreyZ » Mon 16 Dec 2013 14:36

You are welcome.

Post Reply