php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14144 ADO update function in PHP it fails when used with SQL Server 2000 UDT
Submitted: 2001-11-20 06:57 UTC Modified: 2001-11-20 07:39 UTC
From: andrew dot stopford at btinternet dot com Assigned: phanto (profile)
Status: Not a bug Package: COM related
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: andrew dot stopford at btinternet dot com
New email:
PHP Version: OS:

 

 [2001-11-20 06:57 UTC] andrew dot stopford at btinternet dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-20 07:01 UTC] andrew dot stopford at btinternet dot com
Apologies, summary changed to be more accurate.

Andrew Stopford
 [2001-11-20 07:06 UTC] 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:37 UTC] andrew dot stopford at btinternet dot com
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
 [2001-11-20 07:39 UTC] derick@php.net
Not a PHP bug -> Bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC