Page 1 of 1

"Connection options were not set appropriately"

Posted: Tue 04 Jan 2011 09:35
by eh
Running the SDAC ChangeNotification demo I run into following error message when opening Connection 1 :

'The connection options were not set appropriately when the command was submitted'

I ran the 'create-script' in an existing database.

When I create the tables in a new (empty) database everything is working fine, so the problem is on the database.
I compared the properties->options of both databases in Management Studio but there is no difference.

What else can I check ?

Using SQL server 2008, connection with prNativeClient provider.

Posted: Wed 05 Jan 2011 10:11
by AndreyZ
Hello,

It seems that one of your databases has incorrect options. To make notifications work you should set the following options in your database:

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
You can set these options on the server or for each connection in your application.

Posted: Wed 05 Jan 2011 10:35
by eh
Setting the options in SQL server by code did the trick.

Thanks a lot !

Posted: Wed 05 Jan 2011 10:56
by AndreyZ
It is good to see that this problem was solved. If any other questions come up, please contact us.