note 51783 added to function.mssql-connect

From: Date: Mon, 11 Apr 2005 08:33:59 +0000
Subject: note 51783 added to function.mssql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-87811@lists.php.net to get a copy of this message
If you connect to MSSQL and get error 515 (INSERT NULL INTO NOT NULL VALUE). Execute following statement after connection to DB. "set ANSI_NULL_DFLT_ON ON". There are lots of code arround where SP creates, for example, temp tables. There is no specification 'NOT NULL' on columns. Many people beleive that it means that nulls will be allowed. After 5 days of debugging one of the software monsters SQL code I found that PHP connects to MSSQL (at least on my server) without setting "ANSI_NULL_DFLT_ON" which caused SP fired by insert trigger failed with 515 error because temp tables had been created with all columns 'NOT NULL'. QA and from ASP everything was working just fine. After I set ANSI_NULL_DFLT_ON to ON. Everything started working fine. Hope it wil help. ---- Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51783 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51783&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51783&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51783&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51783&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51783&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51783&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87811) next »