#38955 [Opn]: PDO DBLIB driver does not support transactions

From: Date: Tue, 26 Sep 2006 08:46:57 +0000
Subject: #38955 [Opn]: PDO DBLIB driver does not support transactions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-102679@lists.php.net to get a copy of this message
ID: 38955 Updated by: tony2001@php.net Reported By: remery at seminolesheriff dot org Status: Open -Bug Type: PDO related +Bug Type: Feature/Change Request Operating System: Linux PHP Version: 5.1.6 New Comment: No bug here, reclassified as feature request. Previous Comments: ------------------------------------------------------------------------ [2006-09-25 18:43:10] remery at seminolesheriff dot org Description: ------------ I'm connecting from a Linux/Apache/PHP server to a Microsoft SQL Server 2000 database using PDO with the DBLIB driver. Attempting to use transactions produces the exception 'This driver doesn't support transactions'. Reproduce code: --------------- $dsn = 'dblib:host=' . $server . ';dbname=' . $dbName; $user = 'tempUser'; $pwd = 'tmpPwd'; $table = 'sqlTable'; $column = 'colName'; $value = 'value'; $sql = 'Insert Into ' . $dbName; $sql .= ' (' . $column . ')'; $sql .= ' Values ' . $value; $conn = new PDO($dsn, $user, $pwd); $conn->beginTransaction(); $conn->exec($sql); $conn->commit(); Expected result: ---------------- The value should be inserted into the table. Actual result: -------------- Fatal error: Uncaught exception 'PDOException' with message 'This driver doesn't support transactions' in /var/www/html/business/entity.php:37 Stack trace: #0 /var/www/html/business/entity.php(37): PDO->beginTransaction() #1 {main} thrown in /var/www/html/business/entity.php on line 37 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38955&edit=1

« previous php.bugs (#102679) next »