ID:               31343
 Comment by:       liang at saga-city dot com
 Reported By:      iam_simon at hotmail dot com
 Status:           Open
 Bug Type:         MSSQL related
 Operating System: Windows 2000 with Apache 1.3.33
 PHP Version:      5.0.3
 New Comment:

We have the same problem, 
even after adding the "include files". 
The error shows  "SQL Execute failed" ,
but it actually works and success.


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

[2004-12-30 05:31:23] iam_simon at hotmail dot com

You need to include() both of the following files from ADODB package:

adodb.inc.php
adodb-errorhandler.inc.php  

The variable $s in "adodb-errorhandler.inc.php" contains the error
message.

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

[2004-12-30 05:24:28] iam_simon at hotmail dot com

Description:
------------
I have been using ADODB (a pouplar PHP database wrapper) for several
years and recently I upgraded to PHP 5.0.3 on Apache 1.3.33 with MSSQL.
I got tons error messages from log generated by
adodb-errorhandler.inc.php whenever my app uses "INSERT" or "UPDATE" to
the database. There is no problem with "SELECT" statement.

This is a problem with PHP 5.0.3 only,  5.0.2, 4.0.x or below doesn't
have this problem. 

I contacted author of ADODB, Mr. John Lim said it is a MSSQL/PHP bug,
so I am trying to report this bug here.

Although there is an error, but the row has successfully inserted into
the database.  I am using latest version of Adodb. 


Simon

Reproduce code:
---------------
$conn = &ADONewConnection('mssql'); 
$conn->Connect("hostname", "user", "pass", "dbname"); 
$conn->Execute("INSERT INTO visitor_log(date_stamp, ip, host, agent)
Values('2004-12-29 07:10:52PM', '192.168.0.2', '', 'Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)')"); 
$conn->Close(); 

Expected result:
----------------
mssql error: [0: ] in EXECUTE("INSERT INTO visitor_log(date_stamp, ip,
host, agent) Values('2004-12-29 06:59:18PM', '192.168.0.2', '',
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)')")

Actual result:
--------------
no error should be seen


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


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

Reply via email to