Update on MS-SQL 2005

forum.connectivity (1998-2005) & forum.td.connectivity (2005-2010)
klaushaidinger
Austria
Posts: 70
Joined: 13 Dec 2017, 06:08
Location: Austria

Update on MS-SQL 2005

Post by klaushaidinger » 11 Aug 2008, 14:14

 Posted by:  Klaus Haidinger 

hi!

in my application everything works fine except 1 "update". the error is:

Microsoft SQL Server:1934[Microsoft][ODBC SQL Server Driver][SQL
Server]Fehler bei UPDATE, da die folgenden SET-Optionen falsche
Einstellungen aufweisen: 'ANSI_NULLS, CONCAT_NULL_YIELDS_NULL,

any suggestions what to do?

thank you

klaus

James McCall

Update on MS-SQL 2005

Post by James McCall » 29 Aug 2008, 20:56

 Posted by:  James McCall 

This is quite an old post so you probably have a fix already.

I'm no expert in how SQL Server 2005 implements ANSI NULLs and
concate-null-yields-null. Strange that it should complain about the SET
option in an UPDATE statement. Hopefully it is something you don't even
need to think about - do you even want these behaviours turned on? I'd take
a look at MSDN online to understand what they are (if you don't already
know): http://msdn.microsoft.com/de-de/library/ms179472(SQL.90).aspx

You can change the behaviour of these two settings in your database
properties (open the database properties dialog in SQL Server Management
Studio and choose "Options").

You can also make your program change them at run-time ...
Call SqlPrepareAndExecute( hSql, 'SET ANSI_NULLS off' )
Call SqlPrepareAndExecute( hSql, 'SET CONCAT_NULL_YIELDS_NULL off' )

It might also be an issue that can be solved by changing your database
compatibility level. This is also on the database properties dialog in the
"Options" section. You can make your database behave like an older version
(eg. SQL Server 2000).

James

Return to “td.connectivity”

Who is online

Users browsing this forum: [Ccbot] and 0 guests