From: [EMAIL PROTECTED] Operating system: Windows 2000 PHP version: 4.0.6 PHP Bug Type: COM related Bug description: ADO update function in PHP it fails when used with SQL Server 2000 UDT
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 bug report at: http://bugs.php.net/?id=14144&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]