Bug #14144 Updated: ADO update function in PHP it fails when used with SQL Server 2000 UDT
| From: | andrew dot stopford at btinternet dot com | Date: | Tue, 20 Nov 2001 12:37:20 +0000 |
| Subject: | Bug #14144 Updated: ADO update function in PHP it fails when used with SQL Server 2000 UDT | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-71068@lists.php.net to get a copy of this message | ||
ID: 14144
User updated by: andrew.stopford@btinternet.com
Reported By: andrew.stopford@btinternet.com
Old Status: Assigned
Status: Closed
Bug Type: COM related
Operating System: Windows 2000
PHP Version: 4.0.6
Old Assigned To: phanto
Assigned To:
New Comment:
Dear Sirs,
Bug resolved, found to be a slight glitch with SQL Server datatypes that effects PHP and ASP etc
when used within UDT. As a SQL Server problem, rather than a PHP problem I have a closed this bug
report.
Many thanks
Andrew Stopford
Previous Comments:
------------------------------------------------------------------------
[2001-11-20 07:06:07] derick@php.net
I'm assignment this to you Harald, as you worked on converting data types for the COM
extension.
Derick
------------------------------------------------------------------------
[2001-11-20 07:01:02] andrew.stopford@btinternet.com
Apologies, summary changed to be more accurate.
Andrew Stopford
------------------------------------------------------------------------
[2001-11-20 06:57:46] andrew.stopford@btinternet.com
Dear Sirs,
When using Microsoft Active Data Objects in PHP I have come across a problem. The ADO Recordset
insert record function fails with a Invoke Error message if the SQL Server 2000 table contains
fields with User Defined Types.
If the table does not contain UDT then the function works fine and inserts a record into the table.
I have tested the same script using VBscript/ASP and did not get this error.
The sample script is below
<?php
$objcon = new COM("ADODB.Connection");
$dbcon = "DSN=mydb;UID=sa;PWD=;";
$objcon->Open($dbcon);
$objrs = new COM("ADODB.Recordset");
$objrs->CursorLocation = 2;
$objrs->CursorType = 0;
$objrs->LockType = 3;
$sqlquery = "SELECT * FROM MyTable";
$objrs->Open($sqlquery, $objcon);
//this fais if table contains UDT fields
$objrs->AddNew();
$test1 = $objrs->Fields(0);
$test1->value = "Some Data";
$objrs->Update();
$objrs->Requery();
$objrs->Close();
$objcon->close();
?>
Many thanks
Andrew Stopford
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14144&edit=1