ID:               45527
 User updated by:  technischersupport at googlemail dot de
 Reported By:      technischersupport at googlemail dot de
 Status:           Bogus
 Bug Type:         MSSQL related
 Operating System: Windows XP
 PHP Version:      5.2.6
 New Comment:

I asked a sysadmin about that bug and he sent me the following URL:

http://msdn.microsoft.com/en-us/library/ms143729.aspx

In the middle of the page (Features Not Supported in a Future Version
of SQL Server -> Other):

"Although the SQL Server 2005 Database Engine still supports
connections from existing applications using the DB-Library and Embedded
SQL APIs, it does not include the files or documentation needed to do
programming work on applications that use these APIs. A future version
of the SQL Server Database Engine will drop support for connections from
DB-Library or Embedded SQL applications. Do not use DB-Library or
Embedded SQL to develop new applications. Remove any dependencies on
either DB-Library or Embedded SQL when modifying existing applications.
Instead of these APIs, use the SQLClient namespace or an API such as OLE
DB or ODBC. SQL Server 2005 does not include the DB-Library DLL required
to run these applications. To run DB-Library or Embedded SQL
applications you must have available the DB-Library DLL from SQL Server
version 6.5, SQL Server 7.0, or SQL Server 2000."

So why is php using that discontinued code like that?


Previous Comments:
------------------------------------------------------------------------

[2008-07-17 01:07:32] [EMAIL PROTECTED]

[4 Apr 2006 7:03pm UTC] [EMAIL PROTECTED] [delete]

This is a bug in the DB library used in the extension. The only
workarround is to trim the value and that would be wrong if the data
storred actually was a space.



------------------------------------------------------------------------

[2008-07-16 09:21:35] technischersupport at googlemail dot de

Description:
------------
It's the same bug as in:

http://bugs.php.net/bug.php?id=26012
http://bugs.php.net/bug.php?id=26315
http://bugs.php.net/bug.php?id=28124
http://bugs.php.net/bug.php?id=31641
http://bugs.php.net/bug.php?id=36968
http://bugs.php.net/bug.php?id=39204

described.

I'm using MSSQL 2005:
Microsoft SQL Server Standard Edition
Microsoft Windows NT 5.2 (3790)
9.00.3068.00

with php_mssql.dll
Version 5.2.6.6

ntwdblib.dll
Version 2000.02.08 (as supplied with php)


The Table:

        [COLA] [varchar](5) NULL
        [COLB] [varchar](25) NULL
        [COLC] [varchar](5) NULL
        [COLD] [varchar](25) NULL
        [COLE] [varchar](40) NULL
        [COLF] [text] NULL

I've written empty strings to the cells and read it out with the
appended code.

The bug isn't bogus!

Reproduce code:
---------------
$connection = mssql_connect($server, $username, $password, true);

$qry = "SELECT * FROM TABLE";
$result_id = mssql_query($qry, $connection);
$row = mssql_fetch_assoc($result_id)
print_r($row);

Expected result:
----------------
[COLA] => "foo"
[COLB] => "bar"
[COLC] => ""
[COLD] => ""
[COLE] => ""
[COLF] => ""

Actual result:
--------------
[COLA] => "foo"
[COLB] => "bar"
[COLC] => " "
[COLD] => " "
[COLE] => " "
[COLF] => " "


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45527&edit=1

Reply via email to