Req #38955 [Csd]: PDO DBLIB driver does not support transactions
| From: | ssufficool@php.net | Date: | Mon, 21 Jun 2010 07:32:49 +0000 |
| Subject: | Req #38955 [Csd]: PDO DBLIB driver does not support transactions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151711@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=38955&edit=1
ID: 38955
Updated by: ssufficool@php.net
Reported by: remery at seminolesheriff dot org
Summary: PDO DBLIB driver does not support transactions
Status: Closed
Type: Feature/Change Request
Package: *General Issues
Operating System: Linux
PHP Version: 5.1.6
Assigned To: ssufficool
New Comment:
Fixed in trunk.
revision 300628.
Previous Comments:
------------------------------------------------------------------------
[2010-06-21 09:31:49] ssufficool@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fixed in revision 300628.
------------------------------------------------------------------------
[2010-06-21 09:30:50] ssufficool@php.net
Automatic comment from SVN on behalf of ssufficool
Revision: http://svn.php.net/viewvc/?view=revision&revision=300628
Log: Fix bug #38955 - add transaction support
------------------------------------------------------------------------
[2006-09-26 08:46:57] tony2001@php.net
No bug here, reclassified as feature request.
------------------------------------------------------------------------
[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/bug.php?id=38955&edit=1