"Connection options were not set appropriately"

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
eh
Posts: 5
Joined: Sun 02 Jan 2011 12:29
Location: BEL
Contact:

"Connection options were not set appropriately"

Post by eh » Tue 04 Jan 2011 09:35

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.

AndreyZ

Post by AndreyZ » Wed 05 Jan 2011 10:11

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.

eh
Posts: 5
Joined: Sun 02 Jan 2011 12:29
Location: BEL
Contact:

Post by eh » Wed 05 Jan 2011 10:35

Setting the options in SQL server by code did the trick.

Thanks a lot !

AndreyZ

Post by AndreyZ » Wed 05 Jan 2011 10:56

It is good to see that this problem was solved. If any other questions come up, please contact us.

Post Reply