ID: 31428 Updated by: [EMAIL PROTECTED] Reported By: klaus dot kuehne at gga-hannover dot de -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: Windows XP Server PHP Version: 4.3.10 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-01-06 16:58:53] klaus dot kuehne at gga-hannover dot de Description: ------------ Hello, in many cases, mssql_get_last_message() delivers useless results, which are differing from the original SQL Server messages. An example: .. $ret = mssql_query("insert into TAB (KEY) values (13)", $con); if (!$ret) { $errtxt = mssql_get_last_message(); die($errtxt); } .. if value 13 already exists in the unique indexed column KEY of TAB, $errtxt will be set to "Die Anweisung wurde beendet" (in german, translated to english like "statement aborted"). Instead of this, one could expect the message "Cannot insert duplicate key row in object ... with unique index ..." (Code = 2601). This occurs in many other cases, too. In other cases (e. g. SQL-access failed caused by missing user rights on the table), mssql_get_last_message() delivers an empty string, even if the return code of mssql_query() is FALSE. What ist the reason for mhis? Regards Klaus Kühne, GGA Institute Hannover, Germany ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31428&edit=1